Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch File Error do to File Ext.

Status
Not open for further replies.

erock24

Technical User
Aug 14, 2009
4
US
I am trying to run a .cmd file but it errors out do to file extensions in the batch having an "&" sign. Is there a way to code the .cmd file so it won't error out? Or do I just need to rename the path??

Code:
CALL C:\RTSimEXE\RTOutput.exe Q:\IRP09\COS & LRFF\Output\2010 Compare BaseYearChange.o_g Month
CALL C:\RTSimEXE\RTOutput.exe Q:\IRP09\COS & LRFF\Output\2010 Compare Basis only.o_g Month
[\code]
 
Enclose your fully qualified filenames in double quotes


In order to understand recursion, you must first understand recursion.
 
I tried the following with no success...what am I doing wrong??


CALL C:\RTSimEXE\RTOutput.exe "Q:\IRP09\COS & LRFF\Output\2010 Compare BaseYearChange.o_g" Month

thanks,

erock

 
perhaps try

Code:
CALL C:\RTSimEXE\RTOutput.exe "Q:\IRP09\COS ^& LRFF\Output\2010 Compare BaseYearChange.o_g" Month

note ^ before the &
 
have used ^ a few times in batch files to escape pipes | so I guess it's worth a shot
 
For what compelling reason there is a keyword CALL there? Take it out and use quote around the argument(s). It will solve the problem of having space and ampersand at the same time. It is not that escaping ampersand is not needed in some circumstance: but not this one, I think.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top