Batch file parameters not expanded

Nov 30, 2011
4
0
Belgium
#1
Hi,

I'm baffled .. I have a xyz.bat file:
@ECHO OFF
ECHO A Test %1

I execute it from TCC/LE:
xyz myname

And the result is
A Test %1

Why isn't the %1 not expanded to (in this case) myname

Thanks,
Dirk
 
Nov 30, 2011
4
0
Belgium
#3
Hi Charles,

[D:\Util]setdos
ANSI=0
COMPOUND=&
DESCRIPTIONS=1 (DESCRIPT.ION)
ESCAPE=^
EVAL=0,10
EXPANSION=0
MODE=0
NOCLOBBER=0
PARAMETERS=$
CURSOR OVERSTRIKE=15
CURSOR INSERT=100
VERBOSE=1
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,556
46
Albuquerque, NM
prospero.unm.edu
#4
I see nothing wrong there. Frankly, I'm baffled.

Grasping at straws: What does WHICH XYZ report? (Maybe it's an alias, or it starts a different batch file.) How about TYPE /X XYZ.BAT? (On the remote chance that the percent sign isn't really a percent sign.)
 
Nov 30, 2011
4
0
Belgium
#5
Hi Charles,
Actually, when I run C:\Path\xyz.bat myname .. the result is the same
[C:\Program Files\JPSoft\TCCLE13x64]c:\Temp\xyz.bat myname
A TEST %1
 
Nov 30, 2011
4
0
Belgium
#6
I just installed the full version and guess what ..
[C:\Program Files\JPSoft\TCMD16x64]c:\Temp\xyz.bat myname
A TEST myname

C:\Program Files\JPSoft\TCMD16x64]ver
TCC 16.03.55 x64 Windows 7 [Version 6.1.7601]

There it works .. as opposed to the LE version
[C:\Program Files\JPSoft\TCCLE13x64]c:\Temp\xyz.bat myname
A TEST %1

[C:\Program Files\JPSoft\TCCLE13x64]ver
TCC LE 13.06.77 x64 Windows 7 [Version 6.1.7601]

 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,556
46
Albuquerque, NM
prospero.unm.edu
#7
I can't find a way to reproduce that. I'd suggest renaming your .INI file and your 4START file, and restarting TCC/LE. If you still see the same issue, it's probably time to uninstall TCC/LE, reboot, delete the program directory, and then reinstall -- because something is deeply screwy.
 

EWg

Jan 14, 2012
5
0
#8
Hi Dirk,
What's the result of
[C:\Program Files\JPSoft\TCCLE13x64]which echo
Is there somewhere an executable "echo.exe"? Maybe in drive:\cygwin, or any "Unix Tools for Windows", or GnuWin installations, etc.