ExifTool Forum

ExifTool => Developers => Topic started by: ericconn on September 24, 2013, 09:40:29 AM

Title: arg file issues with returns/line breaks on Mac OS X
Post by: ericconn on September 24, 2013, 09:40:29 AM
I have been having issues with getting arg files to do what is instructed of them. I figured out that it's an issue with returns. I had commands on separate lines for separate files, some of which would work, and others that would return "No file specified" when the file was in the location described and the commands, visually, were the same as for the files that did work.

I realized it wasn't the code, because it was 100% identical, but the returns between code. Any suggestions on how to avoid this, instead of having to replace these line breaks by hand? I am going from a spreadsheet to the arg file for the purpose of adding keywords to many, many images. Thanks.

Code in argfile1.txt:
-Keywords+=test argument1
-Keywords+=test argument2
-overwrite_original
/Volumes/harddrive/test/test.jpg
-execute
-Keywords+=test argument3
-Keywords+=test argument4
-overwrite_original
/Volumes/harddrive/test/test1.jpg
-execute
-Keywords+=test argument5
-overwrite_original
/Volumes/harddrive/test/test2.jpg
-execute


test2.jpg would not write the keyword. I would get back:

Mac-Pro:~ macuser$ exiftool -@ /test/argfile1.txt
    1 image files updated
    1 image files updated
No file specified
Title: Re: arg file issues with returns/line breaks on Mac OS X
Post by: Phil Harvey on September 24, 2013, 10:59:07 AM
Currently, ExifTool isn't very flexible about the newline characters in the argfile.  They must be appropriate for the system you are running.  There isn't any way around this right now.

- Phil
Title: Re: arg file issues with returns/line breaks on Mac OS X
Post by: ericconn on September 24, 2013, 12:34:45 PM
Okay, thanks for getting back to me.