Compile Error (cmdln)

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

Compile Error (cmdln)

Post by rodgerwheat » Thu Mar 13, 2008 9:47 pm

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: 399
Joined: Fri Feb 13, 2004 1:05 pm

Post by support » Fri Mar 14, 2008 8:06 pm

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 » Mon Mar 24, 2008 12:21 am

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: 399
Joined: Fri Feb 13, 2004 1:05 pm

Post by support » Tue Mar 25, 2008 12:10 am

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 » Tue Jun 29, 2010 1:44 pm

Hi,

when will the %* error be fixed?

Best Regards
Noxolos

Post Reply