Set Windows filedate according to EXIF createdate

Started by evdalen, September 22, 2014, 09:56:22 AM

Previous topic - Next topic

evdalen

Hi,

I have many Canon MOV videos and iPhone MP4 files. I have already sorted out that I can change the filename successfully (to include the Exif createdate) using the following command:

exiftool "-FileName<CreateDate" -ext MOV -ext mp4 -d "%Y%m%d-%%f.%%e" "."

How can I also change the Windows filedate and time according to the EXIF information?

Thanks,

Edwin


Phil Harvey

Hi Edwin,

Try adding this to the command:  "-filemodifydate<createdate#"

(the "#" is necessary to avoid the effects of the -d option)

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

evdalen

Thanks it works! Great tool!

So the command is: exiftool -r "-FileName<CreateDate" -ext MOV -ext mp4 -d "%Y%m%d-%%f.%%e" "-filemodifydate<createdate#" "."

evdalen

When using this tool for JPG, I assume this is a lossless operation? So no recompression of the JPG data?

Hayo Baan

Quote from: evdalen on September 22, 2014, 10:22:20 AM
When using this tool for JPG, I assume this is a lossless operation? So no recompression of the JPG data?
Yep, only the metadata (in this case the filename) is touched, the rest is unaltered. In fact, exiftool never changes image data!
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

Yes.  ExifTool is always lossless as Hayo mentioned.  The image data is never modified.

But when only writing filesystem information like this, the file itself is not even touched.  So nothing in the file is modified at all.  You will know if ExifTool makes any changes to the file (metadata only) because it will create a "_original" backup file.

It is difficult to make this distinction clear.  I hope I haven't managed to confuse you with my attempt.

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