Need help with scanned pictures

Started by PeterPeter, March 27, 2021, 10:11:40 PM

Previous topic - Next topic

PeterPeter

Hello,
I am new to Exiftool and need help. I have a large number of scanned old pictures. For most of them I was able to put a date in a file name. So most file names are in a format starting with year-month-date and then some additional details, like 'Mary-NewYork", so for example the file name would be 1983-08-13-Mary-NewYork.jpg  What I am trying to do is extrapolate the first 10 characters (8 numbers and two dashes) and add them to exif data as Date Taken, Date Created and Date Modified.  I would like to run this on all pictures in a given folder.
Might be simple thing for someone but I just cannot figure out how to do this.

Thank you in advance for any help in creating a command

Peter   

StarGeek

As long as there are no other numbers in the filename, just year, month day, then you could use this command, which will set the time to midnight on that day.  See FAQ #5 for more details
exiftool "-AllDates<$Filename 00:00:00" /path/to/files/

This command creates backup files.  Add -Overwrite_Original to suppress the creation of backup files.  Add -r to recurse into subdirectories.  If this command is run under Unix/Mac, reverse any double/single quotes to avoid bash interpretation.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

PeterPeter

Thank you so much StarGeek,
this gets me much closer to where I want to be  :)

Results of my tests:
exiftool "-AllDates<$Filename 00:00:00" D:\exiftool-12.22  this correctly changed the 'Date Taken" date to a date specified in the file name but didn't correctly change the Date Created or Date Modified (date modified was changed to current date/time)


exiftool "-Time:All<$Filename 00:00:00" D:\exiftool-12.22  - this command correctly changed 'Date Taken" AND "Date Modified" to the date specified in the file name but didn't change the Date Created. It added however 'Date Acquired' value (to the same value as
Date Taken)

The FAQ says "AllDates is a shortcut for 3 tag names: DateTimeOriginal, CreateDate and ModifyDate" but it doesn't do it in my case. Any ideas?
I am using Windows 10.


Regards

Peter


StarGeek

Quote from: PeterPeter on March 29, 2021, 09:08:48 PM
exiftool "-Time:All<$Filename 00:00:00" D:\exiftool-12.22  - this command correctly changed 'Date Taken" AND "Date Modified" to the date specified in the file name but didn't change the Date Created. It added however 'Date Acquired' value (to the same value as
Date Taken)

Yeah, you really don't want to do this.  You just added about 90+ new tags to the file, most of which aren't very useful.  Run this command to see the results
exiftool -time:all -G1 -a -s file.jpg

QuoteThe FAQ says "AllDates is a shortcut for 3 tag names: DateTimeOriginal, CreateDate and ModifyDate" but it doesn't do it in my case. Any ideas?
I am using Windows 10.

You making the assumption that there is a 1 to 1 correlation between the metadata and the Windows properties.  There is not.  Windows will fill the various data in the properties window from multiple different tags, all depending upon the order they actually appear in the file.  See this post for some examples of what tags Windows reads to fill which properties.

I'm assuming you mean "Created" and "Modified" values that appear under the Properties -> General tab.  Those are the FileCreateDate and FileModifyDate.  They're part of the underlying filesystem and are not embedded data.  Copying to these two tags to change those properties. 

Also take note that if you try to copy a timestamp for a date before 1971 or so to one of these file system tags, you'll get unexpected, inaccurate results. 
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

PeterPeter

All points taken. Thank you.
So running exiftool "-AllDates<$Filename 00:00:00" D:\foldername on all my pics would be the best option so that they sort properly by date in different photo apps or albums on different devices and OS?


In the next few days I will try a few more tests.

Thanks again.
p