The console mode is a mode when the program doesn't open any dialogs and doesn't need any interference from the user. A project for the console mode must be prepared and tested beforehand. This mode enables you to integrate the product with the Windows task schedule system as well as to execute projects prepared beforehand according to the schedule.
For example, in order to execute a project file today at 11.00, use the following command line:at 11:00 "c:\tools\comparer\dcmp.exe -c -s"
The program returns a few error codes in console mode:
How to use return codes? The user can use ERRORLEVEL environment variable in a batch file after the program execution. ECHO.%ERRORLEVEL% line shows return code and IF ERRORLEVEL can be used for execution branching.
@echo off "c:\Program Files\dcmp.exe" -c -r "D:\Projects And Files\project1.dcmp" IF ERRORLEVEL 2 GOTO SAME IF ERRORLEVEL 1 GOTO DIFFERENT echo "Error or nothing to compare" goto end :SAME echo "The tables are identical" goto end :DIFFERENT echo "The tables are different" goto end :end