{ready} not displayed in output when reading with -q in argfile mode

Started by sanurss, December 07, 2011, 12:00:32 PM

Previous topic - Next topic

sanurss

I'm using Exiftool 8.65 on Windows 7 64 bit.
I'm trying to read for example date when photo was taken (DateTimeOriginal) from JPG file.
Source code looks something like this (because whole program is written in C#):

exiftool.exe -stay_open true -@ -
C:\Test\DSC02129.JPG
-groupNames
-veryShort
--printConv
-fast
-ignoreMinorErrors
-q
-q
-EXIF:DateTimeOriginal
-execute0
-stay_open
false


Output looks like this:
[EXIF] DateTimeOriginal: 2009:12:27 10:03:52

But I think it should be:
[EXIF] DateTimeOriginal: 2009:12:27 10:03:52
{ready0}


It is caused by "-q" option and I this it's a bug.

Phil Harvey

From the -stay_open documentation:

            3) Write "-execute\n" to ARGFILE, where "\n" represents a newline
            sequence.  (Note: You may need to flush your write buffers here if
            using buffered output.)  Exiftool will then execute the command
            with the arguments received up to this point, send a "{ready}"
            message to stdout when done (unless the -q option is used), and
            continue trying to read arguments for the next command from
            ARGFILE.  To aid in command/response synchronization, any number
            appended to the "-execute" option is echoed in the "{ready}" mes-
            sage.  For example, "-execute613" results in "{ready613}".


If you really need the -q option, then add a second -execute0 to execute a null command afterwards for the "{ready0}" response.

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

sanurss

Thanks for replay, I didn't noticed this fragment when I was reading some time ago :)