Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

34 Automating Mif2Go conversions > 34.4 Executing operating-system commands > 34.4.3 Monitoring system command execution


34.4.3 Monitoring system command execution

To make system commands (and Windows system responses) visible in a command-prompt window while a conversion is running:

[Automation]

; SystemCommandWindow =

;  Hide (default, no display),

;  Show (show during execution only),

;  Keep (show until user dismisses)

SystemCommandWindow = Show

When you specify Show or Keep for SystemCommandWindow, the system-command.bat file starts with the following lines:

REM For: path\to\sourcefilename

@ECHO Running batfilename

@ECHO ON

The @ECHO ON command causes the rest of the commands in the .bat file to be visible as they are executed; however, the display might be very brief unless you have a huge project. If there is an error, the error message displays even before the Running batfilename line, an unavoidable Windows feature (because stderr cannot be redirected to stdout).

The next line in the .bat file after your system command is:

@ECHO Finished batfilename

If SystemCommandWindow=Keep, the .bat file ends with:

@PAUSE

so that you can see what happened.

Note:  Do not specify SystemCommandWindow=Keep for unattended use, because the .bat file would wait forever for you to press a key.

The .bat file remains in the project directory, so you can see what it contains. The next time you run the same kind of command, Mif2Go recycles the .bat file.



34 Automating Mif2Go conversions > 34.4 Executing operating-system commands > 34.4.3 Monitoring system command execution