|
XP - Making and using a batch file to save time with repeated functions
Posted by: Konix (IP Logged)
Date: July 29, 2007 08:31PM A batch file is great way to save you time and typing if you do several repeated functions on a regular basis (like syncing crates/subcrates to folders, then finding lost files, then delete orphaned). With a batch file, you just have to type the command(s) once, save the file, then double click the file as needed to run it automatically for you, no more typing the commands in Command Prompt!
You can make a batch file for just one command, or several commands as separate files, or several commands in one file, which is what I'll show here. So, open Notepad (Start ~> All Programs ~> Accessories ~> Notepad). Then just type the commands as you would normally in Command Prompt. So let's take the above example of syncing crates, then finding lost/moved files, then deleting orphaned. cd C:\Program Files\ScratchTools java -jar -Xms512m -Xmx512m ScratchTools.jar "C:\Documents and Settings\Todd\My Documents\My Music" --sync-subcrates "2007;Documents and Settings\Todd\My Documents\My Music\2007" java -jar -Xms512m -Xmx512m ScratchTools.jar "C:\Documents and Settings\Todd\My Documents\My Music" --find-lost "Documents and Settings\Todd\My Documents\My Music" java -jar -Xms512m -Xmx512m ScratchTools.jar "C:\Documents and Settings\Todd\My Documents\My Music" --delete-orphaned (optional: you can even open ScratchLIVE automatically after running the commands, just add this to the end of the text file after the ST commands cd C:\Program Files\Serato\ScratchLIVE scratchlive.exe) Then just save this file. Go to File ~> Save As. Change the Save As Type to All Files, then just type in what ever name you want for the file, but add a .bat extension to the end of the file name to make it a batch file. You can save this file anywhere, the Desktop, a folder, doesn't matter, as long as you remember where you put it. The Desktop is a nice place to put it so you always have fast and easy access to it! Now just double click on the file to execute it. This will automatically open Command Prompt and do its thing. Repeat as needed. That's about it! Re: XP - Making and using a batch file to save time with repeated functions
Posted by: Konix (IP Logged)
Date: September 06, 2008 06:40AM updated 09-05-2008
It's come to my attention that if you are trying to sync a subcrate using a batch file, you must use 4 %s instead of 2 %s that you would normally type if doing it manually in command prompt. Subcrates are named "parent crate name%%subcrate name" in the ScratchLIVE folder. But when using a batch file you must use "parent crate name%%%%subcrate name." |
||