Hi everybody !
I try ExifTool to rename files.
I have file names img_2689.mov and i want ExifTool renaming in "Creation date - Hour - Original Name file - Model.extension"
I tried :
exiftool "-filename<createdate" -globaltimeshift "+0:0:0 2:0:0" \ -d %Y-%m-%d_%H-%M-%S.%%e *.*
exiftool "-filename<%f_${model;}.%e" *.*
which rename the file img_2689.mov in 2019-04-20_15-36-32_Iphone.MOV
that's OK but i want Original Name file and space insteed of underscore. How to do ?
Thank's for help ;)
Some links for further reference
The -d (dateFormat) option (https://exiftool.org/exiftool_pod.html#d-FMT--dateFormat) details how to change the date format. You can find the Common Date Format Codes (https://exiftool.org/filename.html#codes) on the "FileName and Directory tags" page.
The percent codes for filename (%f), extension (%e), etc can be found in the -w (textout) option (https://exiftool.org/exiftool_pod.html#w-EXT-or-FMT--textOut).
I'm guessing that you're using the GlobalTimeShift option (https://exiftool.org//exiftool_pod.html#globalTimeShift-SHIFT) to address the fact that the CreateDate is in UTC (as per the standard) and you're in a +2:00 time zone. If that's the case, then the -api QuickTimeUTC option (https://exiftool.org/ExifTool.html#QuickTimeUTC) is a better choice, as you don't need to try and figure out if a date uses Summer/Daylight savings or regular time.
In order to change the underscore to a space, you just need to change it in the format code following the -d. But since the space now breaks up the date code, you need to put quotes around it.
Additionally, since you want to rename by date and model, it's better to move the Extension code (%e with doubled quotes because it's embedded in the date code) out of the date code.
Also, it's better to just use a dot . to represent the current directory than *.*, especially if you plan on recursing into subdirectories at some point (see Common Mistake #2 (https://exiftool.org/mistakes.html#M2)).
So try this:
exiftool "-filename<$createdate %f ${model;}.%e" -api QuickTimeUTC "-d %Y-%m-%d %H-%M-%S" .
Hi StarGeek
Thank's for your answer and tips ! :)
When I try
exiftool "-filename<$createdate %f ${model;}.%e" -api QuickTimeUTC "-d %Y-%m-%d %H-%M-%S" IMG_2737.MOV
I have this answer
Warning: [minor] The ExtractEmbedded option may find more tags in the media data - IMG_2737.MOV
Warning: New file name not allowed in Windows (contains ':') - IMG_2737.MOV
0 image files updated
1 files weren't updated due to errors
And filename is not changed ! :'(
It's probably due to QuickTime UTC format which should be in YYYY:MM:DD HH:MM:SS format
Oops, sorry, my mistake. I quoted the -d wrong.
exiftool "-filename<$createdate %f ${model;}.%e" -api QuickTimeUTC -d "%Y-%m-%d %H-%M-%S" .
Don't be sorry
You saved my day !
That's perfect
Thank's so much !!