Note: ApexSQL Diff console examples are used in this help topic as they are consistent across most ApexSQL applications.
To use ApexSQL Software via the commandline interface you may simple enter in the product name. For example apexsqldiff.
You may also explicitly call the console application with it's explicit filename [productname].com
Calling to [productname].exe is reserved for the GUI application and will initiate this instead of initiate the console application. If arguments are included it will throw a warning dialog similar to this
apexsqldiff.com /switch:value
apexsqldiff.com /switch:"value with spaces"
Use Double quotes for values that contain spaces.
Do not put a space between the colon and the value
To spool output to file vs the console you can use either > (for file output) or >> (for file append)
For Example :
All ApexSQL applications should have support for common return codes. Individual application support of these codes may vary until implementation has been completed in all applications
0 – Success
1 – General error
2 – Illegal argument combination/duplication. Some arguments may not appear in command line at the same time. Some arguments may not be duplicated in command line. Some required arguments are missed in command line.
3 – Invalid value. The value supplied for an argument is invalid.
4 – IO error. Some error occurred during IO operation. Also returned if an application attempts to write to existent file without a user having specified a /force option.
5 – Insufficient permissions. Action cannot be completed because a user doesn't have required permissions.
@C:\ApexSQL\ApexSQLDiff\ApexSQLDiff.com /s1:ABN\TEST2001 /s2:ABN\TEST2000 /d1:pubs /d2:pubs70 /v /f
@echo ApexSQLDiff exit code is %errorlevel%
Help Switch
All console enabled ApexSQL applications support the Help Switch which can be called using either switch /help or /?
The following is an example of Help output:

Verbose Switch
All console supported applications support the Verbose switch which will spool out meaningful messages, warnings, etc during processing. With this switch specified application outputs full operation information to a console. Otherwise it operates in silent mode without any output produced (except some specific switches like /help and /test specified). The following is an example of the generation of a synchronization script with verbose switch on.

Test Switch
All console supported applications support the Test switch which is a useful feature to validate your CLI input prior to processing. This will simply parse switch input and if successful, will list all successfully parsed switches. Application error handling takes precedence over the Test output - so if there is a incorrect switch value then the standard error messages will be returned.

Copyright © 2011 ApexSQL LLC. All Rights Reserved.