To automatically copy videos to backup (local or network) after Handbrake is finished is fairly simple. You create a bat file which waits for Handbrake to close and then attempts to copy any new or modified files over to a specified location. You use Handbrakes built in feature to close itself when the Queue is done to prompt the backup. The program will attempt to back up every time Handbrake is closed but if there is nothing new it will just close.
Go to start -> search for “Notepad” -> type:
@echo off cls start "C:\Program Files\Handbrake\Handbrake.exe"&wait xcopy /d /y /s "C:\[Location where Handbrake saves too]" "\\[Network pathway to save too]"exit
Then save the file as Handbrake.bat and put it in C:\Program Files\Handbrake\. (or a location you know it will be safe). You will need to enter the location where Handbrake saves too as well as the network pathway. If your saving to a local drive or to a mapped network drive then the copy should be “xcopy /d /y /s “C:\[Location where Handbrake saves too]” “X:\[Location where you want the backup]”[/quote]
Where “X” should be the letter of the drive your saving too.
Also, before “exit” if you would want windows to shutdown you could enter “shutdown -f -s” in a line before it or to logoff it would be “shutdown -f -l -t 000”
Next open a new Notepad up and type:
Set WshShell = CreateObject("WScript.Shell") WshShell.Run chr(34) & "Handbrake.bat" & Chr(34), 0 Set WshShell = Nothing
And save it as Handbrake.vbs to the same location as the Handbrake.bat file. This prevents the Handbrake.bat from popping up while handbrake is running.
Now, run Handbrake -> click on “Show Queue” -> in “When Done:” select “Quit Handbrake” and select that.
The last thing to do is right click on all shortcuts for Handbrake (in the start menu or on your desktop) go to properties -> Change Target: ” to be the location of the Handbrake.vbs file. So it should look something like “C:\Program Files\Handbrake\Handbrake.vbs”. (For links pinned to the startbar you will need to unpin it, then pin the new shortcut targeting the .vbs file.
From now on, anytime the Handbrake icon is clicked, the .bat file will be running in the programming waiting for handbrake.exe to close (either by you closing it or having it close its self at the end of the Queue). Once closed, it will attempt to back up any new movie files, if nothing has changed than it will simply close as well. (and shutdown/logoff if you choose to tell it too).