ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: hup on March 31, 2023, 04:55:06 PM

Title: CreateDate
Post by: hup on March 31, 2023, 04:55:06 PM
I have download about 5000 photos from Icloud using the original format of the file. This prevents the change of the CreateDate of the files, which happens, when you use the so clalled most compatible download option.

I would like to ad the CreateDate in the format YYYYMMDD as a prefix to the existing filename.

eg.:
filename: IMG_3586.JPG
createdate 2019:01:19 09:14:18

the result should - if possible - be:

20190119-IMG:3586.JPG

Thanks in advance for any hint.

Hans Uwe
Title: Re: CreateDate
Post by: Phil Harvey on March 31, 2023, 07:18:27 PM
Hi Hans,

exiftool "-testname<createdate" -d "%Y%m%d-%f.%e" DIR

(I'm assuming you don't want to change the underline in the file name to a colon.)

If this does what you want, change "testname" to "filename" in the command to actually rename the files.

- Phil
Title: Re: CreateDate
Post by: StarGeek on March 31, 2023, 08:30:47 PM
Quote from: hup on March 31, 2023, 04:55:06 PMThis prevents the change of the CreateDate of the files, which happens, when you use the so clalled most compatible download option.

This makes me think you mean the file system create date, which is FileCreateDate.  This different from the CreateDate Phil mentioned, as that is actually embedded in the file and part of the EXIF group.

Use this command to look at all the date/time tags in the file and use the one most appropriate in Phil's command
exiftool -time:all -G -a -s /path/to/files/