How to execute the DOS batch file (*.BAT) through the Voyager PILOT program?


Product(s):Cube
Version(s):6.1 to 6.5
Area:Other

A batch file (.BAT) is a script file in DOS, OS/2 and Microsoft Windows. It consists of a series of commands to be executed by the command-line interpreter, stored in a plain text file. A batch file may contain any command the interpreter accepts interactively and use constructs that enable conditional branching and looping within the batch file, such as IF, FOR, and GOTO labels. The term "batch" is from batch processing, meaning "non-interactive execution", though a batch file may not process a batch of multiple data. Occasionally, there are users who would like to implement and execute these files in their models. The attached zip file includes the below Cube catalog example to show how to execute the DOS batch file (.BAT) through the Voyager PILOT program.

Solution

The DOS batch file can be executed easily if both the PILOT program (.S) and the DOS batch file (.BAT) are located in the same folder. But, if those files are located in the different folders separately, the DOS batch file (.BAT) should include the DOS command (e.g. ‘CD’) process to change the folder position before performing the Voyager scripts (.S) or any customized programs. As the attached examples, there are two options to change the folder position from the folder (e.g. ‘{Catalog_Dir}\Model’) with the PILOT program (.S) to the folder (e.g. ‘{Catalog_Dir}\Input_Data’) with the batch file (.BAT).

communities.bentley.com/.../TEST_5F00_Batch_5F00_Run.zip