Compile Error (cmdln)

Convert your BATch files into EXEcutable format in one click.
rodgerwheat
Posts: 1
Joined: Thu Mar 13, 2008 8:45 pm

Compile Error (cmdln)

Post by rodgerwheat »

The combination of the characters %* seems to cause a compile problem as below:

@echo off
set a=test
echo %a%*
pause

The batch result is: test*

The compiled result is: testcmdln

Thanks, Rodger
support
Site Admin
Posts: 476
Joined: Fri Feb 13, 2004 1:05 pm

Post by support »

Yes, this is a parser error. By default, %* combination reserved as "command line parameter", but should be skipped in this case.
Will be fixed soon.
sKurt
Posts: 32
Joined: Mon Jul 23, 2007 5:37 am

*.*

Post by sKurt »

I ran into the same problem when I was trying to do a *.* type of query with my .BATch file

I ended up using

SET q=*.*

and then could use it like

DIR %q%

or in your case maybe

SET q=*

and you could then do your code like this

@echo off
set a=test
echo %a%%q%
pause
support
Site Admin
Posts: 476
Joined: Fri Feb 13, 2004 1:05 pm

Post by support »

Yes, your code can be used for current version of compiler as temporary solution.
Noxolos
Posts: 2
Joined: Mon Jun 28, 2010 10:55 am

Post by Noxolos »

Hi,

when will the %* error be fixed?

Best Regards
Noxolos