Hi,
I'm using exiftool in a bash script to copy photos from a SD card (or a camera) to a specific folder like this:
origFolder="$photoRoot/%Y/%m - %B %y/%y%m%d$labelImport1"
exiftool -o . '-filename<CreateDate' -@ $licenseFile \
-Keywords+="$labelImport" \
-d "$origFolder/$labelImport2%y%m%d-%%f.%%e" \
"$photoFile"
The thing is the destination folder, $origFolder, is in the end an exiftool encoded value which relies on the CreateDate of the input file $photoFile.
Now, after exiftool has moved the file (in fact the files since this sequence is in a loop), I'd need to cd to the real $origFolder where it's been copied.
Is there a way to achieve this? For instance in saving the -d value to some variable?
If I'm understanding you correctly, the only way to run exiftool with the -d and the -s (-short) option (https://exiftool.org/exiftool_pod.html#s-NUM--short) and capture that output
exiftool -d "$origFolder/$labelImport2%y%m%d-%%f.%%e" -s3 File.jpg
But you should know that running exiftool in a loop will significantly increase the processing time. See Common Mistake #3 (https://exiftool.org/mistakes.html#M3).
Thanks @StartGeek, with the help of what you suggested I could sort it out.
I'm pretty sure running exiftool in a loop is less efficient in terms of performance, but the loop allows you to pipe some lines with a zenity --progress that is showing a progression bar I find interesting.
I don't know other way to do it.