How to specify the location of exiftool self-extraction files?

Started by ifihadahammer, March 05, 2023, 01:56:50 AM

Previous topic - Next topic

ifihadahammer

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.

Phil Harvey

Set the system PAR_GLOBAL_TEMP environment variable to the directory you want to use for the temporary files.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ifihadahammer

#2
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?

Phil Harvey

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.  I think it will install into a directory specified by the user.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ifihadahammer

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.  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?

StarGeek

"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

obetz

although I'm a bit late:

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