How to change Date modified and Date created in file information

Started by stuartdo, November 27, 2016, 10:22:15 AM

Previous topic - Next topic

stuartdo

Hello,

I am new to the Exif tool, and to be frank I am not sure I really sure I understand how the command line abbreviations and code are supposed to be written. But this tool seems to be the one that has the most options for getting and using EXIF data.

I recently got a new cell phone and copied all my photos from the phone to an SD card, from an SD card to my computer, and then to another, larger SD card for the new phone.  In the process, my computer gave all the files new date created and date modified dates as part of the file information (not the EXIF data).  Over 3000 photos now all show up in the same day on my android phone, which uses the date modified entry to organize the photos in the gallery.

Is there a way to have this tool pick up the date from the EXIF and then re-write the date modified or date created (or both) entries in the file information? If you could show me exactly what to write in the command line, and an example of what it should look like when done, that would be truly helpful.

Thank you!

Stuart

Phil Harvey

Hi Stuart,

Yes.  Here is the command:

exiftool "-filemodifydate<datetimeoriginal" "-filecreatedate<datetimeoriginal" DIR

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

ajacobs

Hi Phil,

I'm scanning old photos and I have Date Taken set to 1/06/1970 with increments of 5 seconds.
I have used your statement exiftool "-filemodifydate<datetimeoriginal" "-filecreatedate<datetimeoriginal" "D:\Temp\Date Zwarte Woud" to change dates and the strange behavior is that the date modified  en date created is now 31/05/1870 / 00:00:20.
I have also a QNAP Nas and have a drive mounted with a drive letter. When I execute the above code, nothing is changed?
OS: Wondows 10.


StarGeek

Due to a problem with the Perl date/time libraries, exiftool cannot properly set the file system timestamps to a date between 1900:01:01 00:00:00 and 1971:12:31 23:59:59.
* 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).