I have these recovered photo’s from my old website and saved them from Photoshop > save for the web, so no EXIF data is present.
My photos are in folders with the date names like so:
So now I would like to take the the date from the folder name and write that into the EXIF as ‘Date Time Original’
I had a look at the command line from EXIFTool and for my folders I can write the dates to the photo’s with:
exiftool -overwrite_original -DateTimeOriginal=“2004:05:25 00:00:00” desktop/test/try/2004-05-25/*.jpg
Can anyone help me with this?
Thanks for any help!
Model: MacBook Pro
AppleScript: 2.2
Operating System: Mac OS X (10.5)
set theFolder to choose folder with prompt "choose images target folder"
set thePictures to paragraphs of (do shell script "find " & quoted form of POSIX path of theFolder & " -iname '*.jpg'")
set TID to text item delimiters
repeat with onePicture in thePictures
try
set text item delimiters to "/"
set theDate to text item -2 of onePicture
set text item delimiters to "-"
set theDate to text items of theDate
set text item delimiters to ":"
set theDate to theDate as text
do shell script "exiftool -overwrite_original -DateTimeOriginal=\"" & theDate & " 00:00:00\" " & quoted form of onePicture
end try
end repeat
set text item delimiters to TID