Batch parameters broken?

May 20, 2008
Syracuse, NY, USA
Rex, you seen this BTM before, during the beta testing. A few versions ago I tested all four of the following, and they all worked.
... | tee /a v:\raw%1.dat | gosub iprocessline | tee /a v:\intruders%1.log (gosub)
... | tee /a v:\raw%1.dat | call :iprocessline | tee /a v:\intruders%1.log (call subroutine)
... | tee /a v:\raw%1.dat | v:\iprocessline.btm | tee /a v:\intruders%1.log (another BTM)
... | tee /a v:\raw%1.dat | iprocessline | tee /a v:\intruders%1.log (library function).

None work with build 25. I get a variety of error messages, but it looks like the batch parameters are not propagated properly. Some of the error messages look like this.
TCC: (Sys) The process cannot access the file because
TCC: (Sys) The process cannot access the file because
Those file names are wrong. They should be raw1.dat or raw2.dat and intruders1.log or intruders2.log, depending on the value of %1 (1 or 2).
May 20, 2008
Syracuse, NY, USA
Boiled down a tad, that certainly seems to be the problem. Below, the file name is not correct; %1 was not known in the piped instance.
v:\> type b1.btm
echo %1 | tee %1.txt

v:\> b1.btm foo

v:\> type foo.txt
TCC: (Sys) The system cannot find the file specified.

v:\> type .txt
Similar threads
Thread starter Title Forum Replies Date
T Fixed Problem with use of Batch parameters in the IDE Support 1
Jay Sage WAD Possible Bug in Batch Parameters Support 7
S Documentation Topic: Batch File Parameters Support 14
fpefpe How to? shortcuts and batch files Support 4
vefatica `Back quotes` - command line vs. batch file Support 5
fpefpe How to? batch file size Support 2
FreezerBurnt Help making a CMD and TCC compatible batch file Support 7
M Oracle batch OPatch.bat.bat not working in TCC but correctly in CMD Support 5
Joe Caverly Set a batch variable (%1 - %n) when TCC is executing a batch file Support 5
P Kill all other instances of tcc from a btm batch file Support 2
fpefpe batch file ending early Support 18
R Batch Debugger Command Expansion Window Support 3
K robocopy cancelling batch file processing Support 28
A Unable to pass batch file arguments unaltered Support 18
K Batch debugger not stepping correctly Support 4
S incorrect message at start Cancel batch job 4START.bat ? (Y/N/A) : Support 1
MickeyF Why does this batch file give me 'unknown command "else"' error? Support 17
Joe Caverly "Functions" in cmd.exe batch files Support 6
S Batch files Calling Batch Files Support 2
P exit /b in batch files Support 7
P Labels in batch files: TCC vs CMD.exe Support 9
cxxl Set encoding for batch file Support 4
dcantor How to? Batch file to be executed by TCSTART Support 4
J New lexer for TCC batch files. Support 0
T Fixed IDE locks up if edit window for running batch is closed Support 6
T How to? Show the values of batch variables on the TCC screen Support 21
D Alias in batch file Support 3
TT's Help! Uninstalling TCC did not restore cmd.exe as Win10 default batch file processor. Support 4
vefatica Exit code of a batch file? Support 4
J cd command altered in batch file Support 3
MickeyF running a program from cmdline versus in batch file Support 1
B Batch file won't run if there is already an instance of TC 17 running Support 9
nickles Fixed Executing long command lines in a batch generates file name errors Support 16
T batch execution Support 9
rjperrella start /tabna leaves blank windows when running batch scripts Support 10
jadaml Echo unicode characters from UTF-8 Batch files? Support 1
J Files Disappearing During Batch Execution Support 4
nickles Fixed In batch files, %0 now evaluates to the absolute path Support 9
D Installation batch files Support 5
C How to? run a batch file in administrator mode while debugging in take command software Support 1
R Unexpected 'Cancel Batch Job' prompts Support 13
cgunhouse Fixed bdebugger with not exist batch file causes a crash Support 2
Mezlo menu batch file questions Support 25
D Run all .CMD batch files with CMD.EXE Support 16
T Lua sharing data with batch files Support 2
F Minimising the command window running from a batch file Support 19
C How to? ctrl-c does not prompt "Terminate batch job" Support 2
S How to? Batch file problem Support 67
CWBillow Setting and changing Vars in batch files Support 26
S How to? Incorporate tables from HELP into batch file Support 15

Similar threads