To run a batch file, follow the steps below for where you want to run the batch file.
It's used as an input file for the command-line interpreter CMD to run a. You can easily create a batch file to automate tasks on a Windows PC.
Running a batch file from within Windows
A batch file runs like any other executable file by double-clicking the file within Windows. However, because a batch file runs in a command line, it immediately exits when done, so you may only see a black box for a second.
TipIf the batch file is closing too fast, or you want to read the output, you can edit the batch file. Add a pause command to the end of the file at the beginning of a new line. The pause command waits for user input before continuing.
Run a batch file from the Command Prompt
To run a batch file, move to the directory containing the file and type the name of the batch file. For example, if the batch file is named 'hope.bat,' you can type 'hope' to execute the batch file.
Additional information
Batch files give you the ability to create and run processes, cycles, and schedules without having to log into Certify. You run batch files from the command line program Certify.exe. For more information, see Understanding Certify.exe.
To create a batch file:
- Click Processes in the Navigation pane.
The Processes window appears.
- In the Processes Summary pane, select a process and click the Run button or right-click a process and select Run.
The Configuration dialog box appears.
- Verify the settings to create your batch file.
- Click Export.
The Save As dialog box appears.
- Select or create a file folder.
- Type in the file name in the File Name text field.
- Click Save.
The file is saved as a .bat file.
To run a batch file:
- Open the Command Prompt window with one of the following:
- Microsoft Windows DOS command prompt
- Windows Run dialog box
- DOS batch file.
The Command Prompt window appears.
- Change to the directory where you saved the batch file.
- Type the batch file name.
- Note: Values for each command line argument are taken from the current Certify configuration file or from the Certify common business layer. If the parameter is optional and the configuration file has the default value selected, the parameter is not saved in the batch file.
- Press <Enter> to run the process.
- Type your database administrator user name and password and press <Enter>.
- Type your Certify user name and password and press <Enter>.
The batch file runs and the process results are sent to the output location. You can view the results in the Results Viewer.
- Note: <Ctrl> + <C> stops the process from running.
Viewing Results
After you have run your Certify process, you are able to quickly view status results with the following exit codes:
- 0 = Certify process passed
- 1 = Certify process failed
- 2 = Certify process aborted
- 3 = Certify process skipped
- 4 = Unknown