Writing -DateTimeOriginal with directory

Started by qwerty15, June 10, 2018, 03:49:18 PM

Previous topic - Next topic

qwerty15

Hi all!
I am just getting started with ExifTool to manage old family photos I am digitizing. I would like them to have accurate date exif data. They are already ordered chronologically, so they are in computer folders by year, ie each photo from 1950 is in a folder named "1950". I can now change the date Exif data for all photos in an individual folder, but this could be made miraculously fast if I could instead change the date using a generalized command with the year replaced by something like -Directory. However I'm on macOS and the actual directory is the entire file path, /User/[user]/desktop/FamilyPhotos/1950 . Anyone know how I could utilize these handy folder names in writing the exif date?
Thanks so much!!!!

StarGeek

See FAQ #5 paragraph 3.

So yes, you can use Directory as long as the only numbers are the ones you want to use and you fill out the rest of the numbers (month, date, hour, etc).  With your example of "/User/[user]/desktop/FamilyPhotos/1950", you could use "-alldates<$directory 0101 000000" which would set all the EXIF date tags to "1950:01:01 00:00:00".

If your directory had extra numbers, for example something like "/User/[user]/desktop/FamilyPhotos/Batch 001/1950", then something else would have to be done, as the 001 would throw things off.

Bonus answer, because it's usually a follow up to questions like this, to increment seconds so as to keep the images in a certain order, see this post.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

qwerty15