ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: ifihadahammer on March 05, 2023, 01:56:50 AM

Title: How to specify the location of exiftool self-extraction files?
Post by: ifihadahammer on March 05, 2023, 01:56:50 AM
Exiftool is shipped as a self-extracting Perl library.

How does one specify the file system folder (directory) to which it will self-extract?

I would prefer not to have it extract to the system temp folder.
Title: Re: How to specify the location of exiftool self-extraction files?
Post by: Phil Harvey on March 05, 2023, 07:57:13 AM
Set the system PAR_GLOBAL_TEMP environment variable to the directory you want to use for the temporary files.

- Phil
Title: Re: How to specify the location of exiftool self-extraction files?
Post by: ifihadahammer on March 05, 2023, 08:55:30 AM
Quote from: Phil Harvey on March 05, 2023, 07:57:13 AMSet the system PAR_GLOBAL_TEMP environment variable to the directory you want to use for the temporary files.

- Phil

Thanks so much Phil. 

I gave it a try on a Windows box, but exiftool still used the system's default Temp directory instead of the one specified by PAR_GLOBAL_TEMP.

Is there a way to set it via the exiftool command line by using a parameter?
Title: Re: How to specify the location of exiftool self-extraction files?
Post by: Phil Harvey on March 05, 2023, 10:19:56 AM
Unfortunately by the time exiftool runs a command it is already unpacked in to the temp directory.

Maybe try looking at the alternate Windows version of ExifTool (https://oliverbetz.de/pages/Artikel/ExifTool-for-Windows).  I think it will install into a directory specified by the user.

- Phil
Title: Re: How to specify the location of exiftool self-extraction files?
Post by: ifihadahammer on March 05, 2023, 04:01:54 PM
Quote from: Phil Harvey on March 05, 2023, 10:19:56 AMUnfortunately by the time exiftool runs a command it is already unpacked in to the temp directory.

Maybe try looking at the alternate Windows version of ExifTool (https://oliverbetz.de/pages/Artikel/ExifTool-for-Windows).  I think it will install into a directory specified by the user.

- Phil

Ah, that makes sense.  Thanks.

I'll take a look at the alternate Windows version.  Reading the author's words, seems like a solid choice.

Any idea why setting PAR_GLOBAL_TEMP didn't work on Windows?  I tried the obvious (e.g. C:\example), and then a few different combinations of the not-so-obvious (e.g. C:/example, C:\example\, "C:\example").  But with hundreds of different combinations/permutations in the not-so-obvious category (no quotes, double quotes, single quotes, backslashes, forward slashes, terminating slash, etc.) I didn't try them all.

Do you know what it's expecting?
Title: Re: How to specify the location of exiftool self-extraction files?
Post by: StarGeek on March 05, 2023, 04:10:07 PM
Maybe look at this thread (https://exiftool.org/forum/index.php?topic=8758.0).
Title: Re: How to specify the location of exiftool self-extraction files?
Post by: obetz on March 18, 2023, 10:51:35 AM
although I'm a bit late:

PAR_GLOBAL_TEMP causes problems and is "discouraged" according to the PAR/pp maintainer.