Change a Creation Date based on Parent Folder Name

Started by elpabloB, May 02, 2020, 08:32:47 AM

Previous topic - Next topic

elpabloB

So, I have a lot of photo files that I've downloaded from my online sharing platform which is now closing.  I need to set the dates of all the files back to the original upload date, and currently I have managed to use the EXIF data to replace the 'Creation date' for all my camera photos.  However there are a lot of Camera Phone photos that need to be changed as well.

All the files are stored in a parent folder for the day of original upload eg - "2017-05-02" .  Is there a way to automate all files to have their creation date match this format of the date in the folder they are found ?

Phil Harvey

The short answer is "yes".  There are lots of posts in here which explain how to do this.  I'm heading out now so I don't have time to explain, but if you still need help I'll check back again when I return.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

More info would be needed to give you an exact command, but here's one example that will pick YYY-MM-DD out of the directory path.  That command requires that your current directory not be the same as the files, i.e. you can't use a dot or * for the directory path.
* 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).