Change creation date of a VIDEO file using terminal command touch

Hi guys! I am trying to change the creation date (Mac Ventura) in a terminal with the command touch -t YYYYMMDDHHMM, and it works, but the issue with this command is that there are no SECONDS. A new date created automatically shows seconds as 00.

I tried the format YYYYMMDDHHMMSS but it does not work. Does anyone know similar command to change creation date for video files? Thanks in advance.


Posted on Dec 4, 2024 3:06 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 4, 2024 11:43 PM

Alternatively you can use setfile to adjust creation [d] and modification [m] dates independently ("setfile" is included in Xcode Command Line Tools install).


setfile -h


setfile -d '01/15/2000 23:50:11' -m '01/15/1999 23:50:11' movie.mp4


BTW when using setfile via exiftool commands I noticed that unlike earlier Xcode versions, Xcode 6 fails if there are time zones in the input. exiftool 13.02 and later patched this so such old exiftool commands work again.


https://exiftool.org/forum/index.php?topic=15578.msg89427#msg89427

Similar questions

3 replies
Question marked as Top-ranking reply

Dec 4, 2024 11:43 PM in response to afanata

Alternatively you can use setfile to adjust creation [d] and modification [m] dates independently ("setfile" is included in Xcode Command Line Tools install).


setfile -h


setfile -d '01/15/2000 23:50:11' -m '01/15/1999 23:50:11' movie.mp4


BTW when using setfile via exiftool commands I noticed that unlike earlier Xcode versions, Xcode 6 fails if there are time zones in the input. exiftool 13.02 and later patched this so such old exiftool commands work again.


https://exiftool.org/forum/index.php?topic=15578.msg89427#msg89427

Dec 4, 2024 10:27 PM in response to afanata

Thanks for sharing & following up.


FYI, you can usually get more information on how to use a command by looking at its help or manual page by using the "man" command or sometimes by adding the option " -h ", or " --help" to the command (the latter will usually be a short summary, so using "man" is best since some commands may use the " -h" option for something else).


For example:

man  touch

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Change creation date of a VIDEO file using terminal command touch

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.