Hello,
the photos of my smartphone have no EXIF-DateTaken.
I want to run a batch that:
-process files from "c:/photo"
-fetch the date from filename and write it into EXIF-DateTaken
-rename file with "filename<CreateDate"
-move the file to "c:/photo/%Y/%m/%Y%m%d_%H%M%S%%-c.%%le"
I have phrases for every single step, but don't know how to combine it.
Thanks for your help,
Tommes
Quote from: Tommes on December 30, 2020, 06:39:18 AM
-fetch the date from filename and write it into EXIF-DateTaken
What is the format of the filename? If it's in some form of YEAR MONTH DAY HOUR MINUTE SECONDS (any characters in between the numbers can be ignored), then the basic command would be
exiftool "-AllDates<Filename" c:/photoSee FAQ #5 (https://exiftool.org/faq.html#Q5), specifically the 3rd paragraph.
Quote-rename file with "filename<CreateDate"
-move the file to "c:/photo/%Y/%m/%Y%m%d_%H%M%S%%-c.%%le"
Try this to see if it does what you want
exiftool -d "c:/photo/%Y/%m/%Y%m%d_%H%M%S%%-c.%%le" "-TestName<CreateDate" c:/photoIf it looks good, change
TestName to
Filename
It looks god! Thank you.
I changed to command to my NAS-folder and hat remove "-d" what is this for?
Can I combine the two commands?
/usr/bin/exiftool "-AllDates<Filename" /volume1/photo/_IMPORT/_sonstige
/usr/bin/exiftool -d "/volume1/photo/_IMPORT/_sonstige/%Y/%m/%Y%m%d_%H%M%S%%-c.%%le" /usr/bin/exiftool -d "/volume1/photo/_IMPORT/_sonstige/%Y/%m/%Y%m%d_%H%M%S%%-c.%%le" "-Filename<CreateDate" /volume1/photo/_IMPORT/_sonstige
If CreateDate doesn't already exist, then not really. You can't copy the new value as you set it. You can use the -execute option (https://exiftool.org/exiftool_pod.html#execute-NUM) to combine them but that won't be more than a second or two faster than running two separate commands.
Quote from: Tommes on December 30, 2020, 01:21:42 PM
Can I combine the two commands?
This is possible, but difficult because you would need to reformat the FileName yourself using the advanced formatting feature since you wouldn't be able to take advantage of the date/time formatting with
-d.
- Phil