I couldn't find a Handbrake thread, but this is more about the rest of the command rather than the Hardbrake part.
I use this script to batch convert all the video files in a folder with Handbrake. This version I use just to reduce size on extremely large files, but I also tweak it to convert avi to mp4 as well.
This version works perfectly, dropping the converted file in the same location as the original:
Code:
FOR /F "tokens=*" %%F IN ('DIR /B /S *.MP4') DO "C:\Program Files (x86)\Handbrake\HandBrakeCLI" -i "%%F" -o "%%F".mp4 --preset="Normal"
This version, which I am trying to get to drop the converted file into a pre-designated folder, does not.
Code:
FOR /F "tokens=*" %%F IN ('DIR /B /S *.MP4') DO "C:\Program Files (x86)\Handbrake\HandBrakeCLI" -i "%%F" -o D:\Handbrake_Output\"%%F".mp4 --preset="Normal"
Obviously my syntax on
"D:\Handbrake_Output\%%F".mp4 is incorrect, however everything I have tried has come up wrong. There are no spaces in the filenames I am testing on, but it should be able to handle them.
I also know there are executables that will do this job out there, but I want to keep this as a script I can run from any computer.