I am trying to rename files my CreateDate_model_01
When I run the command it dose not run. what do I need to change to make it run "$input_variable?
Also how to ad a one up number at the end?
exiftool -d '%Y%m%d' '-FileName<${CreateDate;}_${Model;}%-c.%e' "$input_variable"
I assume you are on Mac or Linux. (probably mac due to your user name)
How are you assigning the "input_variable"?
Do you always want the number at the end? Always 2 digits? What exactly do you want the number to signify? You might try something like "-%.2nc".
- Phil
Yes on a Mac
This is my full command
echo "Enter the file path of Images"
read input_variable
exiftool -d '%Y%m%d' '-FileName<${CreateDate;}_${Model;}-%.2nc' "$input_variable
I added -%.2nc
You forgot the closing double quote. But with that, the script should work (but you should add ".%e" to the end of the fie name). You can test out the passing of variables using the exiftool -echo option if you need to troubleshoot this.
- Phil