Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Batch file parameters not expanded

Nov
4
0
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
 
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
 
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.)
 
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
 
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]

 
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.
 
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.
 
Back
Top
[FOX] Ultimate Translator
Translate