Trouble with -stay_open in command line

Started by Jms, June 04, 2025, 10:14:08 AM

Previous topic - Next topic

Jms

Hi, I'm using exiftool in windows cmd. I am running this command: exiftool -stay_open True -@ "args.txt" (abbreviated args path - using absolute paths).

In args.txt I have the following command: "{image path}" > "{output path}" -execute

If I were to run exiftool -stay_open True "{image path}" > "{output path}" -execute directly in command line the program would extract the image metadata, write it to the output file then terminate. Trying to run it through the argument file doesn't extract the metadata or write it.

I can't tell if the program is executing the command or not. My goal is to eventually use the -RawThermalImage tag to extract images in mass. Is there something I am missing?

StarGeek

The greater than sign > is file redirection, which is a property of the command line. Exiftool never sees that part of the command because the command line processes that part and doesn't pass it on to exiftool.

Because of that, you can't use it as part of an ARGS file.

What you probably want to use is the -w (-TextOut) option.
"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

Jms

Ok, I wrote the following in the ARGS file:

{image path} -w {output test file} -execute (where {} are the absolute paths)
-stay_open\nFalse\n

and it is still hanging forever. Nothing was written to the output and the program never terminates. Same goes for -csv, I can't get the program to do anything I can recognize as it actually executing an operation in the ARGS file.

Phil Harvey

The args file should look like this:

{image path}
-w
{output test file}%0f
-execute
-stay_open
False

- 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 ($).