Problem with calls in TCC batch file

Oct 29, 2008
2
0
Hi All

I've encountred a problem running jruby on my WinXP computer when attempting to start jruby in the TCC/Lite shell. I am using TCC LE 9.02.152.

I have created a test batch file which I run in TCC and in CMD shells.

CMD SHELL

C:\Test>test_class_path.bat
TEST_CP=start;C:\Test\somefile1.jar;C:\Test\somefile2.jar

TCC SHELL

[C:\Test]test_class_path.bat
TEST_CP=start;:setcp C:\Test\somefile1.jar;:setcp C:\Test\somefile2.jar


Notice the ":setcp" text

Here are the two batch files that are used to generate the above results. There are also two files named somefile1.jar and somefile2.jar in the test directory.

@echo off
rem test_class_path.bat
rem Run this batch file to see how TCC processes add data to environment var
SET TEST_CP=start
@call "_make_class_path.bat"
echo TEST_CP=%TEST_CP%
SET TEST_CP


@echo off
rem _make_class_path.bat
rem Test batch file to demo problem with batch file differences in TCC vs standard CMD.exe
SET TEST_CP=%TEST_CP%
rem ----- Set Up The Test Classpath ----------------------------------------
for %%i in ("C:\Test\*.jar") do @call :setcp %%i
goto :EOF

rem setcp subroutine
:setcp
if not "%TEST_CP%" == "" goto add
set TEST_CP=%*
goto :EOF

:add
set TEST_CP=%TEST_CP%;%*
goto :EOF


Is this a bug in TCC?

Thanks
Rudi
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,461
88
Albuquerque, NM
prospero.unm.edu
Quite possibly. It looks like the name of the subroutine is getting into %*, which doesn't seem correct to me.

As a workaround, I think you can do the same thing more simply via something like:

set test_cp=
for %f in ( c:\test\*.jar ) set test_cp=%test_cp;%f
set test_cp=%@right[-1,%test_cp]

(Suggestion to Rex for future versions: an option to @EXPAND for user-specified separator characters?)
 
Similar threads
Thread starter Title Forum Replies Date
H problem downloading takecommand.pdf TCC/LE Support 4
keithg1964 Display problem TCC/LE Support 2
T Problem with CDD in WIN8 64 BIT TCC/LE Support 2
A WAD Problem with copiing file TCC/LE Support 23
G Problem running telnet TCC/LE Support 12
F Problem with TCC window colors TCC/LE Support 3
jason404 Problem with redirecting output TCC/LE Support 4
R Danish character redirection problem TCC/LE Support 5
Jesse Heines Request for TCC Date Command Custom Format Example TCC/LE Support 4
P TCC LE crashes without any info after recent windows updates TCC/LE Support 3
V TCC LE doesn't expand %~ff correctly TCC/LE Support 5
A vcvarsall.bat command not working on TCC LE command prompt TCC/LE Support 16
M DEBUG dialogs from TCC TCC/LE Support 1
Captain'Flam False condition in IF force loop exit (TCC/LE 14 64bits) TCC/LE Support 3
M How to get the number of chars, which fit in the currently displayed TCC-window? TCC/LE Support 3
M TCC/LE works with Windows Insider Skip Ahead Build 17618 TCC/LE Support 1
D Bug with TCC/LE and volumes mounted under directories TCC/LE Support 5
B Error in TCC/LE when succeed smoothly in native windows cmd.exe TCC/LE Support 6
A TCC/LE x64 no longer works with Windows 10 Insider Preview Build 17063 TCC/LE Support 7
adam_0 TCC/LE string replacement differing from cmd.exe TCC/LE Support 3
D Incorrect icon for TCC/LE prompt here, Windows 10 TCC/LE Support 5
B Run TCC without interactive logon TCC/LE Support 0
T WAD option /u on TCC LE 13.06.77 TCC/LE Support 2
B Copy command to set timestamp not working in TCC/LE TCC/LE Support 5
R WAD TCC/LE does not set %_ffind_files TCC/LE Support 1
P Window width TCC TCC/LE Support 3
A installer for latest tcc/le isn't working TCC/LE Support 0
M Any plans for an updated TCC/LE version TCC/LE Support 16
miXza-81 Fixed There is Batch breaking bug in TCC LE (x64) TCC/LE Support 9
M Getting started with TCC/LE TCC/LE Support 3
John A TCC/LE not finding files in the c:\windows\system32\ directory? TCC/LE Support 4
Tim Rowe How to? TCC/LE colour not working with RSpec TCC/LE Support 14
R converting from NT to TCC/LE TCC/LE Support 3
jbanaszczyk [Q] How to retrieve / set current TCC/LE language TCC/LE Support 1
T C# Process.Start() never ends when starting TCC/LE process? TCC/LE Support 5
R WAD TCC LE pipe fails TCC/LE Support 6
M TCC LE x64 13.0 crash in Win 8 Pro 64-bit TCC/LE Support 0
A ftp on tcc/le TCC/LE Support 2
B What are the TCC settings that will allow maximum cmd.exe compatibility? TCC/LE Support 11
R TCC/LE attrib +/- C? TCC/LE Support 6
S Just wondering what TCC/LE 13.05.68 fixed TCC/LE Support 1
R TCC/LE steals the .btm association? TCC/LE Support 1
S Fixed TCC-LE 13.05.65 x64 "option" command tabs broken TCC/LE Support 4
rconn News TCC/LE 13.05 Released TCC/LE Support 0
F WAD Different value for %~dpfsI in TCC/LE TCC/LE Support 2
Charles Dye ? command, TCC/LE vs. supported TCC/LE Support 3
B TCC/LE prompt here TCC/LE Support 1
G Pin TCC/LE to task bar and start menu TCC/LE Support 6
jason404 A particular program that I like to use no longer works in TCC/LE TCC/LE Support 25
rconn News TCC/LE 13.04.56 Released TCC/LE Support 0

Similar threads