Image-ExifTool - Re: How to COPY files and not move them with Exiftool ?

Posted on Tue Sep 2 17:35:12 2008 by exiftool in response to 8720 (See the whole thread of 3)
Re: How to COPY files and not move them with Exiftool ?
To copy a file instead of modifying the original, you use the -o option to specify a different output directory. In your case it is a bit trickier since you are also specifying a different directory by writing the Directory tag, but this will still work as the Directory tag takes precedence over the -o option. ie)

exiftool -o dummy "-directory<D:/photos/originals/$model/$serialnumber/$createdate" -d %Y/%Y%M/%Y% +M%D ...

I think this should work, but having said that I don't think you want to do it because the only way to avoid accessing the memory card multiple times for each file is to first copy all of the files to a temporary directory on your hard disk.

Then the trick is to append to your txt file the tags from only the copied photos. This would be best done by writing a Perl script to do exactly what you want since exiftool is not set up to do this. In theory it could be done with a bit of fancy shell scripting, but I wouldn't know how to do this in Windows.

The alternative is to do something like this:

1) copy memory card to a temporary directory ("TMP")

2) Create a batch file that will append to your .txt files ("FILE.txt", one per directory):

exiftool TMP -p "exiftool -T -@ MYTAGS.args $directory/$filename >> D:\photos\original\$model\$ser +ialnumber\$createdate\FILE.txt" -d %Y/%Y%M/%Y%M%D" > OUT.bat

(I'm not sure about whether or not "\" needs to be escaped in a Windows shell)

3) Run the batch file:

OUT

You could also write a MOVE command to the batch file to avoid the next step, or run exiftool again, like this:

exiftool TMP "-directory<D:/photos/original/$model/$serialnumber/$createdate" -d %Y/%Y%M/%Y%M%D"

I know this is confusing stuff, but I hope this helps.

- Phil
Direct Responses: 8728 | Write a response