querying/writing tag to a list of files (batch processing)

Started by gcue, April 19, 2016, 09:48:07 AM

Previous topic - Next topic

Phil Harvey

It should work fine with just one line in the -@ argfile.  There must be something else going on.  Post your full command and the argfile and we'll try to help.

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

gcue

Quotecommand:
exiftool -UserComment -DateTimeOriginal -GPSPosition -@ list.txt

list.txt:
C:\Users\Smith\Desktop\New folder1\IMG_3799.jpg

if i add another entry to list.txt i get output but i dont get anything with just one entry.

thanks!

Phil Harvey

I can't see anything wrong, but you didn't attach the list.txt file and some hidden characters may be significant.

I tried it with no extra characters in list.txt (ie. no leading UTF-8 BOM and no linefeed at the end of the line), and it worked fine.

I would like to find the reason for this, but a work-around may be to add a blank line to the file.

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

gcue

i dont see any hidden characters or extra spaces

i tried adding an extra few blank lines - still nothing (no error no output)

using current version of exiftool 10.2.5

thanks for your help

Phil Harvey

I can't reproduce this problem.  I just tried it with your list.txt file and got this (on Windows 10 with ExifTool 10.25):

"File not found: C:/Users/GXM/Desktop/New folder1/IMG_3799.jpg"

And it worked fine when I changed the file to one that existed.

So I have no idea why this doesn't work for you.  Your file had no extra hidden characters.  There must be something else going on here.

But maybe try my idea of adding a blank line to the .txt file

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

gcue

i tried adding a blank line.. even a few.. still no luck =/

running windows 7 64bit

Phil Harvey

This makes absolutely no sense.  I can see no way that a single file in the -@ argfile could ever be ignored.  Maybe try adding -v to the command line to see if there are any messages that could yield a clue.

- Phil

Edit:  Oh, wait.  There will be no output for a single input file if the tags don't exist.  And ExifTool only gives the "### image files read" message if there was more than one file specified.  This must be what you are seeing.  Try it on a file where these tags exist.  This is the same behaviour if the files are specified on the command line, and has nothing to do with the -@ option.
...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 ($).

gcue

that worked =)

i guess i expected something different because if you run 2 files where the tags don't exist you still get an output: each of the file paths

to be consistent, would it be easy to incorporate that?

nice catch!

Phil Harvey

A majority of the time people run exiftool on a single file, and for this case the extra messages are superfluous, so reducing clutter trumps consistency in this case.

Maybe the -progress option will give you what you want?

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

gcue

yes i think so, i just have to parse out the [#/#] somehow with stringregexp or something

thanks for all your help