How To Automate CD / DVD Recording with GEAR Batch Files Generate a Log File
A GEAR batch file is a text document that contains one or more GEAR commands. These commands are the instructions for the GEARWorks Recording Engine. When you use GEAR PRO for Windows, UNIX, or Linux, you normally use the graphical user interface (GUI, or UI). The menus found in this interface contain commands, and they may include other windows or dialog boxes that help you define the parameters of the operation that you wish to perform. When you execute a GEAR command from the GUI, one or more GEARWorks commands will be executed. You can see what the GEARWorks commands that are associated with your actions by generating a log file. If you save this log file, you have saved the sequence of GEAR commands that you executed, along with feedback from the GEARWorks recording engine, in the form of comments. To create a GEAR batch file, you can either use a text editor, such as Windows Notepad to type the sequence of GEAR commands, or you can perform the desired operation using the Graphical User Interface, and save the log file. This log file can be used as a batch file, to tell GEAR to repeat the same sequence of commands. You can edit this log file to change any specific commands or parameters that you do not want repeated. Editing a Log File You can use a text editor such as Windows Notepad to look at the log file. Save your log file with the extension .gbf, and you now have a GEAR Batch File. All lines that are preceded by a semicolon are comment lines-these lines are ignored when you run the batch file. If you add comments to the log file, remember to start the line with a semicolon (;). You can also add any GEAR formatting commands to the batch file (these commands correspond to the GEAR for Windows commands available in the menus). For a detailed list of available commands, see Using GEAR Commands in the GEAR User Manual. Note - Due to the way GEAR commands are called by the graphical user interface of GEAR PRO, you may have to add the "writecd" command or other commands to your log file when creating a batch file. Please refer to the GEAR command reference in the GEAR User Manual for a complete list of GEAR commands, and their syntax. Running a GEAR Batch File When you run a batch file, each command in the file is executed. You can convert a log file to a batch file, or you can create a batch file manually in a text editor. When you run a batch file, lines that begin with a semicolon or an unknown command will be ignored. If there are lines that have invalid or missing parameters, GEAR prompts you to provide the parameter.
This function is useful when GEAR is called by another program, such as script or scheduler. To run a batch file automatically when you start GEAR, you must run the following command: GEAR /B [/A] [/X] batchfile.gbf (where /B stands for: using a batch file, /A and /X are optional, /A stands for: run automatically, /X exits GEAR after completion of the batch). Please note... You can execute GEAR commands from the File menu using "File/Run GEAR Command". The command syntax is described in Appendix B of the GEAR manual. Whenever you execute a command and you have the log view/window enabled (see Window menu), you will see the result on the screen and/or log window. |