1.

Solve : Problem w/ Escape "^": cmd-line vs. batch?

Answer»

The SET command works at the interactive command line as I would like, but does not work the same when executed from TEST.BAT (see attached).

How should I CHANGE the contents of TEST.BAT to obtain the same results as the command-line version?

[attachment deleted by admin to conserve SPACE]In a batch file you need to double up the percent symbols if you need to escape them.  The carrot will not do that for percent symbols.You can copy and paste from a CMD window - RIGHT click the title bar and see the Edit menu.

Is this what you need?

Code: [Select]ECHO off
set "variable=%%word%%"
echo "%variable%"
pauseDo you need the information in the file?
And do you prefer cmd or batch?



Discussion

No Comment Found