Touch Command on Converted Video File

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Touch Command on Converted Video File Fri Nov 22, 2013 10:49 pm • by Plex
With the help of this group I have my HandBrakeCLI script working like a charm. Now I'd like to add to the script (or create a new one) that will amend the creation / created and/or modification / modified date(s) of the converted file to match the original file. This is important to me because iPhoto will sort by date created in my albums.

Based on my research, the touch command seems to be the easiest method and the code I've found (and tested successfully in the terminal) is (where MTS is the original file and m4v is the converted file:

Code: Select all
touch -r 2013.11.22.MTS 2013.11.22.m4v


What I'm trying to figure out if Hazel can do it automate this process, identity the file pairs, and run the script - such that if the file name of the original file (excluding the extension) matches the file name of the converted file (excluding the extension) then the script will pair those two files and convert.

What complicates (I think) this is that I'm usually converting a bunch of home movies at once - so there may be 5-10 MTS files and their converted m4v files in the same directory at any given time.

Is this even possible? And, of course, I'm open to any other suggestions on how to automate this.

Thanks!

Edit: I found this thread and have asked a question there which could net me the same results as what I'm seeking here.
Plex
 
Posts: 14
Joined: Mon Nov 18, 2013 8:02 pm
Location: Colorado

Re: Touch Command on Converted Video File Mon Nov 25, 2013 2:16 pm • by Mr_Noodle
I've responded in the other thread.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support