

(other command(s) featuring "%%F", "%%~nF", etc.)īut I’d be very surprised if it didn’t work on Windows 10. HandBrakeCLI.exe -preset-import-file "preset-name.json" ^Īll of the above works at the Command Prompt (command line).Įxcept you must replace each % with %%: for %%F in (*.mov) do ( You can also break long commands into multiple lines with ^: for %F in (*.mov) do ( The documentation is not clear about the factĮ.g., %~dpnF gives you the drive, the path, and the name,īut not the extension - as if you had typed %~dF%~pF%~nF.) (For example, %~dF gives you the drive letter, and %~pF gives you the path. Type for /? to see a list of all the ~ codes. (other command(s) featuring "%F", "%~nF", etc.) HandBrakeCLI.exe (blah blah blah) -i "%F" -o "%~nF.mp4" You can do this with parentheses: for %F in (*.mov) do ( You may want to break this into multiple lines,Īnd/or because you want to do other things in the loop. (not including the extension), so %~nF.mp4 becomes your output filename. %~nF is replaced by the name portion of the filename With space(s) or other special characters in them.) (You might be able to get by without the quotes -īut then it will fail if you have any filenames Then the command following the do is executed for each file, In which %F takes on every applicable *.mov name. This is fairly straightforward: for %F in (*.mov) do HandBrakeCLI.exe (blah blah blah) -i "%F" -o "%~nF.mp4" HandBrakeCLI.exe … … -i dog.MOV -o dog.mp4 HandBrakeCLI.exe … … -i cat.MOV -o cat.mp4

HandBrakeCLI.exe … … -i bug.MOV -o bug.mp4 folder), and you want to do HandBrakeCLI.exe (blah blah blah) -i ant.MOV -o ant.mp4 OK, I guess you have a bunch of files like ant.mov
