Renaming the converted file

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

Moderator: Mr_Noodle

Renaming the converted file Tue Sep 03, 2013 3:07 pm • by seeplanet
Currently I have some rules to convert some video to .mp4 using the HandbrakeCLI. And right now the converted file includes the extension of the original filename. Can someone help me rename the file that was converted so that the old extension is not there?

Original file name: test.ts.mp4
Converted name: test.ts.mp4

What I'd like: test.mp4

Currently my script:

Code: Select all
/usr/local/bin/HandbrakeCLI -i  "$1" -o "${1%avi}".mp4 -e x264 -b 3000 --optimize -w 720 -l 404


I'd be happy to create a rule that could rename the file after this if no one can help me with the script, but I can't figure out that either.

Thanks all!
seeplanet
 
Posts: 8
Joined: Thu Nov 10, 2011 3:34 am

Re: Renaming the converted file Thu Sep 05, 2013 12:11 pm • by Mr_Noodle
Look up "match patterns" in the help. You can set up a custom token to match the part you want to keep and use that in a rename action.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Renaming the converted file Thu Sep 05, 2013 12:21 pm • by seeplanet
Yep! That did it. Thanks!
seeplanet
 
Posts: 8
Joined: Thu Nov 10, 2011 3:34 am


Return to Support