We try to keep TCC as compatible as possible with CMD, given the limitations and bugs in CMD, the variances in CMD in different versions of Windows, and the thousands of additional features available in TCC. On rare occasions, you may find batch files that exploit undocumented features (or bugs) in CMD (or are simply badly written) that don't work in TCC. In almost all of those cases, TCC will run those batch files if you set the appropriate compatibility options.


There are two options you should set if you regularly run batch files created for CMD:


OPTION / Startup / Duplicate CMD.EXE bugs (This is the default, and tells TCC to duplicate two bugs in CMD's IF command parsing.)


OPTION / Startup / CMD.EXE delayed expansion (If you have this startup option set for your CMD environment.)


If you only run batch files created for CMD, you should also set:




in your TCMD.INI file. WARNING: This means you won't be able to run any batch files written for TCC, which only requires a single leading % for variables.


There are also some TCC features that might on very rare occasions cause conflicts with CMD batch files:


Enable "OPTION / Startup / Search for SFNs". (Definitely not recommended unless you want some potentially unpleasant results when you're copying, moving, or deleting files, but it *is* how CMD does it.)


Disable pseudovariable expansion (OPTION / Advanced / Special Characters).


SETDOS /X279 to disable nested aliases, quoting, and include lists.


Finally, if you want CMD-style command line editing (i.e., practically none), you can remove most of the TCC command line editing features with the OPTION / Command Line dialog.