Page 1 of 1

Renaming the converted file

PostPosted: 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!

Re: Renaming the converted file

PostPosted: 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.

Re: Renaming the converted file

PostPosted: Thu Sep 05, 2013 12:21 pm
by seeplanet
Yep! That did it. Thanks!