Calgarypuck Forums - The Unofficial Calgary Flames Fan Community

Go Back   Calgarypuck Forums - The Unofficial Calgary Flames Fan Community > Main Forums > The Off Topic Forum > Tech Talk
Register Forum Rules FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 04-11-2012, 04:50 PM   #1
Rathji
Franchise Player
 
Rathji's Avatar
 
Join Date: Nov 2006
Location: Supporting Urban Sprawl
Exp:
Default Handbrake Script (Windows batch file question)

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.
__________________
"Wake up, Luigi! The only time plumbers sleep on the job is when we're working by the hour."
Rathji is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 04:04 AM.

Calgary Flames
2024-25




Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright Calgarypuck 2021 | See Our Privacy Policy