ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: evdalen on September 22, 2014, 09:56:22 AM

Title: Set Windows filedate according to EXIF createdate
Post by: evdalen on September 22, 2014, 09:56:22 AM
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

Title: Re: Set Windows filedate according to EXIF createdate
Post by: Phil Harvey on September 22, 2014, 09:59:18 AM
Hi Edwin,

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

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

- Phil
Title: Re: Set Windows filedate according to EXIF createdate
Post by: evdalen on September 22, 2014, 10:13:48 AM
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#" "."
Title: Re: Set Windows filedate according to EXIF createdate
Post by: 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?
Title: Re: Set Windows filedate according to EXIF createdate
Post by: Hayo Baan on September 22, 2014, 01:11:13 PM
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!
Title: Re: Set Windows filedate according to EXIF createdate
Post by: Phil Harvey on September 22, 2014, 04:25:16 PM
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