Consumer Products
GEAR ISO Burn – FREE SOFTWARE!
Professional Products
GEARImage GEAR PRO – Mastering Edition GEAR PRO – Professional Edition GEAR PRO UNIX GEAR PRO Linux
GEAR Powered Products
discWelder - Minnetonka Software
Downloads Area Get Support Now! Free Pre-mastering Tools Activate GEAR! Transfer GEAR License Drivers Updates Supported Recorders User Forums Knowledgebase/Wiki
Product User Manuals
• Windows Products • GEAR PRO UNIX • GEAR PRO Linux
How To Guides
• Windows Products • GEAR PRO UNIX • GEAR PRO Linux
Custom Development GEARWorks SDK • AudioWorks • DataWorks • VideoWorks • DuplicationWorks • MasterWorks Developer Support Login
Awards GEAR Powered Solutions Press Contact Us

How To Automate CD / DVD Recording with GEAR Batch Files

GEAR's batch utility (found in GEAR PRO versions only) lets you run multiple GEAR commands automatically, without ongoing interaction from you. The easiest way to create a batch file is to use the "Generate Log File" command in the File menu, capturing GEAR commands while you manually perform the actions you want to automate. This is particularly useful for incremental backups or if you have to create the same image periodically with updated files, a CD that is updated quarterly, for example. As you create the image, the commands you use are saved in a log file. You can use this log file as a reference to create batch files, or sometimes you can edit the log file and use it as a batch file. You can also read the log file to check the image generation process.

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.


Generate a Log File
  1. Choose Generate Log from the File menu.
  2. Generate Log File

  3. Enter a name for the log file or choose one under File Name. Choose a location to save the file, then click Create. If you select the option Show log in the Window menu, you will notice that Logging started is displayed in the Status window.
  4. Create log file

  5. Perform the actions you want to save in the log file. Each action you perform is recorded in the Status window.
  6. When you are finished, un-check "Generate Log" from the File menu. "Logging stopped" is displayed in the Status window.
  7. Create a GEAR Batch 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.

    Run Batch Command

  8. Choose Run Batch from the File menu to display the Name of batch file dialog.
  9. Locate and choose the log or batch file you want to use, then click Open. Lines preceded by a semicolon (;) are comment lines - they provide information about the command lines in the log and are ignored when you run the batch file, for example
    ; Comment line
    Command line
    1. GEAR prompts you to run the batch automatically using the default dialog values. Click Yes. As the batch file is processed, its status is displayed in the Status window.
    Running a batch file as a GEAR startup-option

    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...
    • GEAR needs to be initiated from the GEAR software directory, because the program relies on several files in that directory.
    • You may need to substitute the name of your GEAR executable file (gearpme.exe, gearppe.exe, etc.) for the GEAR command.
    • When you run a batch file, GEAR's graphical user interface will appear.
    Running a GEAR command

    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.