-*Edit 3-28-10* For simplicities sake I've edited this to only show the easiest way to make the .bat file & what you need to change.
--*EDIT 4-02-10* There is now a AutoHotKey script that I have made if you are using HandBrake that allows you to select a folder/directory containing your video's and use HandBrakeCLI to convert all of the videos on that folder. You can find more info @ my blog here
http://jsgoblog.wordpress.com/I've managed to create a HandBrakeCLI batch file that will go through your video directory & convert your movies to the format/preset of your choice. Here is my setup as an example.
All my video's/movies get stored in D:\ as either .avi or .mpg. The batch file is also located in D:\
@ECHO OFF
FOR /F %%i IN ('dir /b *.avi *.mpg *.flv') DO (
"C:\Program Files (x86)\Handbrake\HandBrakeCLI.exe" -i "%%i" -o "E:\Movies\%%~ni.mp4" --preset="Roku"
)
pause
FOR /F %%i IN ('dir /b *.avi *.mpg') DO (
This tells the .bat file to look for files within the same directory with the file extension of .avi & .mpg. If you want to add more formats you might try
('dir /b *.avi *.mpg *.flv *.iso')
If you need to add a file extension just follow the example here.
If you have Handbrake the above code will work, simply copy & past the above code into a text document.
Replace
C:\Program Files (x86)\Handbrake\HandBrakeCLI.exe
with the location of your HandBrake install.
Replace
E:\Movies\%%~ni.mp4
with the directory\folder you want the converted files to go to i.e. C:\My Vids\%%~ni.mp4
Replace
--preset="Roku"
with the name of the preset you use to convert your files to a playable format on the Roku Box. i.e --preset="Your Preset"
Once your finished save the document as .bat or rename the file using the .bat extension instead of .txt & place the .bat file in the folder or directory you specified (where your video files are) & run the .bat file.
I've only tested this with .avi's & .mpg's (2 small clips of each file type) and the CLI quickly converted them. This is my first batch script so test this first on a small video file that you DON'T care about in case something goes wrong. I'm still trying to find a way to automate this when I have free time.