Changing "Date created" to the "File modified" date

Started by NightAndTheSilentH20, May 24, 2019, 09:53:18 AM

Previous topic - Next topic

NightAndTheSilentH20

Hello,

First of all, I've absolutely no experience with coding etc, so my bad if I'm just asking you straight up what to do...

So I had to transfer my pictures from my phone to my PC, then back to my phone. And when the PC copied the pictures, it changed the "date created" to the date I copied them, so when I copied the pictures back onto my phone their order got all messed up.

Now I heard there was a code one could use with exiftool to change the "date created" (formed when the pics got copied onto the PC) to the original date in the "file modified" (the original order of the pics on the phone). I lurked a bit on here, and tried a couple codes I saw, but I have no idea what I'm doing so it didn't work.

Can you guys help me out please?

Thank you!


Phil Harvey

It sounds like you either want to copy the filesystem modification date/time to the filesystem creation date/time:

exiftool "-filecreatedate<filemodifydate" DIR

or set the filesystem creation date/time from the original date/time stored in the file's metadata:

exiftool "-filecreatedate<datetimeoriginal" DIR

- 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 ($).

obetz

The OP was a bit fuzzy since "when the PC copied the pictures" doesn't indicate the copy direction.

Creating files on Android with a "user" (e.g. copy back to phone) account doesn't preserve timestamps. You need root access to set timestamps.

That's extremely annoying especially for syncing.

Copying from Android phone to PC usually preserves mtime.

Oliver