Filename to file creation & modification date

Having tech problems? Post them here and do not worry, there is always a solution for you.
Post Reply
matti
Posts: 20
Joined: Sat Dec 31, 2016 12:13 pm

Filename to file creation & modification date

Post by matti » Mon Apr 29, 2019 8:54 pm

Can I copy filename to file creation & modification date with GC?

2005-1012-1203-29.mp4 for example (YYYY-MMDD-hhmm-ss.mp4), but I can use another date date format in the filename, if necessary.

I have several hundred old video files (H.263 .3gp, Photo-JPEG .mov, Motion JPEG OpenDML .avi) that Apple's Photos/iTunes either fails to transfer to iPad Pro ("Unsupported file type") or that the iPad silently ignores to copy. I have used MPEG Streamclip to convert them to H.264 .mp4 which fixes those errors with old codecs. The converted files have current timestamps. But I want to preserve the original creation and modification dates so they sort correctly and shifting the timestamps and corresponding filenames can be automated with GC, if necessary.

As a start, I individually set the creation and modification dates with File Buddy. But with hundreds of files this is frustratingly laborious, slow and error-prone. I wish I could do this in GC.

User avatar
forum_adm
Site Admin
Posts: 543
Joined: Fri Dec 23, 2016 9:41 am
Location: Germany
Country: Germany
Contact:

Re: Filename to file creation & modification date

Post by forum_adm » Mon Apr 29, 2019 9:32 pm

Hi,

yes, just select the file in the GraphicConverter browser.

Select in the context menu Exif/Set Exif Date from Filename:
Screen Shot 2019-04-29 at 21.29.58.jpg
Screen Shot 2019-04-29 at 21.29.58.jpg (92.45 KiB) Viewed 98 times
Now configure the setting depending the filename. The file date will be set, too.
Screen Shot 2019-04-29 at 21.30.07.jpg
Screen Shot 2019-04-29 at 21.30.07.jpg (67.79 KiB) Viewed 98 times
Thats it.

Thorsten

matti
Posts: 20
Joined: Sat Dec 31, 2016 12:13 pm

Re: Filename to file creation & modification date

Post by matti » Wed May 01, 2019 9:01 am

Thanks, "Set Exif Date from Filename..." command works fine! (But daylight savings time and renaming via EXIF produce some unexpected weird errors with video files, see below.)

Somehow I missed that command. I wasn't aware that GC supported EXIF in video files. What codecs (H.264, Photo-JPEG, ...) or wrappers (.mp4, .avi, ...) are supported?

It seems only "Set Exif Date from Filename..." command can write to video files' EXIF metadata -- other commands like "Set EXIF Date to File Creation Date" or "Shift the EXIF timestamp..." have no effect with .mp4 files.

"Set movie dates" option writes the filename's date to the .mp4's EXIF, switching it OFF just changes the file date if "Set the file date identical to the Exif date" option is ON.

I noticed that the "Set movie dates" and "Use UTC" options have some weird effects depending on the daylight savings time the user should be aware of:

Currently in May the daylight savings time is ON. If I set 2005-0101-1200-00.mp4 EXIF (i.e. daylight savings time was OFF in January), the EXIF date is correctly set:

2005:01:01 12:00:00+02:00 ("Use UTC" ON)
2005:01:01 12:00:00 ("Use UTC" OFF)

...if I then rename the .mp4 via its EXIF, the filename is 1 hour off incorrectly as follows:

2005-0101-1100-00.mp4 ("Use UTC" ON)
2005-0101-1300-00.mp4 ("Use UTC" OFF)

...setting 2005-0601-1200-00.mp4 (i.e. daylight savings time was ON in June) works fine with "Use UTC" ON but with it OFF, the rename via EXIF sets it +3 hours incorrectly.

In the past I have noticed that renaming video files works best via file creation/modification dates because renaming via video EXIF produces unexpected and different results during the winter and summer times!

User avatar
forum_adm
Site Admin
Posts: 543
Joined: Fri Dec 23, 2016 9:41 am
Location: Germany
Country: Germany
Contact:

Re: Filename to file creation & modification date

Post by forum_adm » Wed May 01, 2019 10:09 am

Use UTC depends on the movies. Some camera manufacturers stores as UTC and some not.

User avatar
forum_adm
Site Admin
Posts: 543
Joined: Fri Dec 23, 2016 9:41 am
Location: Germany
Country: Germany
Contact:

Re: Filename to file creation & modification date

Post by forum_adm » Wed May 01, 2019 10:10 am

Exif itself is normally stored without any time zone at local time.

User avatar
forum_adm
Site Admin
Posts: 543
Joined: Fri Dec 23, 2016 9:41 am
Location: Germany
Country: Germany
Contact:

Re: Filename to file creation & modification date

Post by forum_adm » Wed May 01, 2019 10:11 am

The rename process of movies depends onto this setting:
Screen Shot 2019-05-01 at 10.11.11.jpg
Screen Shot 2019-05-01 at 10.11.11.jpg (349.41 KiB) Viewed 88 times

matti
Posts: 20
Joined: Sat Dec 31, 2016 12:13 pm

Re: Filename to file creation & modification date

Post by matti » Sun May 05, 2019 11:00 am

I have old video files I want Apple Photos to sort correctly. "Set Exif Date from Filename..." command is very useful there:

It seems 1970-0101-0000-00 is the earliest possible .mp4 QuickTime Create/Modify Date. Any earlier filename date has no effect to that field.

But Apple Photos gets the date from File Modification Date/Time so QuickTime Create/Modify Date is not so important.

File Modification Date/Time back to year 1800 are accepted in GC (Finder displays dates back to 1904-0101-0200) but they revert to 1970-0101-0200 (or some random future date) after a reboot.

But anyway setting such old File Modification Date/Time via GC is useful because then Apple Photos automatically gets the correct date instead setting such old videos to 1970-0101-0200.

Post Reply