Start your batch file with the following, adjusting the TCC path to your system or defining an environment variable and using that instead. This fragment preserves any exit code set by a “quit #” statement.
Usage examples are svn hooks or Retrospect Backup event handler scripts, which explicitly look for .bat files and start them with cmd.exe.
On my systems, I symlink or junction “C:\Program Files\JPSoft\TCMD” or “C:\Program Files\JPSoft\TCCLE” to the current version, so any batch files don’t need to be adjusted every time I upgrade.
Usage examples are svn hooks or Retrospect Backup event handler scripts, which explicitly look for .bat files and start them with cmd.exe.
On my systems, I symlink or junction “C:\Program Files\JPSoft\TCMD” or “C:\Program Files\JPSoft\TCCLE” to the current version, so any batch files don’t need to be adjusted every time I upgrade.
Code:
@echo off
if 01 == 1 goto tccstarthere
"C:\Program Files\JPSoft\TCMD\tcc.exe" /c %0 %*
exit /b %errorlevel%
:tccstarthere