Changing dates with Automator / by Paulo Fierro

For my birthday Niqui got me this dive mask from Liquid Image. Its a nice mask and the video taken with it is great but the four rechargeable AAA batteries power it for about 90 minutes. Most of our dives are an hour or less so that's not a problem, and the mask comes with a battery recharger – however while charging the batteries the camera forgets the date.

You have to set the date each and every time. Its a minor thing but it annoys me so I don't do it. For some reason the default date is set to Monday, January 8, 2035 – a strange choice.

So because I'm lazy and don't change the date on the camera every time, when I eventually drag the video files into Final Cut I get crap like this:

Transient

Having some events with the right date and some in the future makes organising video for projects a nightmare. So after googling around I found that I could use the touch command in the Terminal to change the creation date. If I do this on each file before importing it into Final Cut I avoid the problem. So the command is basically:

touch -t yyyymmddHHMM <PATH_TO_FILE>

Still, doing this on multiple files is a massive pain so I toyed with the idea of writing a script for it. I have used Automator in the past and figured doing things like selecting items using the Finder's File Selection dialog is easier than using a command line script so that's what I did and you can see the "recipe" below.

It accepts a string which is the date you want the file to have been created, you select the files and you're done. It keeps the original time too, which may not be something you want but I don't really care about the time. As long as the files have the right date and are sequenced correctly its good enough for me.

You can download the application here. You can also open it up with Automator and modify it as you see fit.

While doing this I learned Automator actually has support for variables – who knew? Its a powerful tool and I don't think I use it enough.

Transient