Is there a wildcard or code for the file name?

Discussion of the HandBrake command line interface (CLI)
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
johnzapf
Posts: 29
Joined: Tue Jun 07, 2016 2:44 pm

Is there a wildcard or code for the file name?

Post by johnzapf » Thu Jun 09, 2016 7:20 pm

I would like it to get any file I have in the "VIDEO" folder and output to the "MP4" folder keeping the same name on the file, is that possible? ie: C:\Users\John\Desktop\VIDEO\test.mov to C:\Users\John\Desktop\MP4\test1920.mp4, etc... I don't want to have to change the name of the file or the script each time.

I want to put a file in the Video folder (filename.mov) and have it output to the MP4 folder (filename1920.mp4) and I dont want to have to change the "filename" is there a wildcard or code for "filename"?

handbrakecli -i C:\Users\John\Desktop\VIDEO\"filename".mov -o C:\Users\John\Desktop\MP4\filename1920.mp4 -w 1920 --preset="Normal"
handbrakecli -i C:\Users\John\Desktop\VIDEO\"filename".mov -o C:\Users\John\Desktop\MP4\filename1280.mp4 -w 1280 --preset="Normal"
handbrakecli -i C:\Users\John\Desktop\VIDEO\"filename".mov -o C:\Users\John\Desktop\MP4\filename960.mp4 -w 960 --preset="Normal"
handbrakecli -i C:\Users\John\Desktop\VIDEO\:filename".mov -o C:\Users\John\Desktop\MP4\filename640.mp4 -w 640 --preset="Normal"

Woodstock
Veteran User
Posts: 3156
Joined: Tue Aug 27, 2013 6:39 am

Re: Is there a wildcard or code for the file name?

Post by Woodstock » Thu Jun 09, 2016 8:42 pm

Depends upon your operating system and shell.

Windows can uses %~n1

Try this link for more: http://steve-jansen.github.io/guides/wi ... ables.html

Post Reply