ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: Jms on June 04, 2025, 10:14:08 AM

Title: Trouble with -stay_open in command line
Post by: Jms on June 04, 2025, 10:14:08 AM
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?
Title: Re: Trouble with -stay_open in command line
Post by: StarGeek on June 04, 2025, 10:58:47 AM
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 (https://exiftool.org/exiftool_pod.html#w-EXT-or-FMT--textOut).
Title: Re: Trouble with -stay_open in command line
Post by: Jms on June 04, 2025, 12:04:21 PM
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.
Title: Re: Trouble with -stay_open in command line
Post by: Phil Harvey on June 04, 2025, 03:34:50 PM
The args file should look like this:

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

- Phil