boris
2008-10-10 08:00:16 UTC
Heres a batch file, lets call it: "test1.bat"
test1.bat:
@ECHO OFF
SET TMPTEXT=%~1%
ECHO %TMPTEXT%
Now, on the command line call the batch file like so:
test1 "blah "something;something else""
The output should be:
blah "something
I want the entire string output. I need a method of escaping the semi-colon, or the double-quotes, or some way to get that batch file output the entire string not splitting it up.
What I'm trying to achieve is: I have a text file with environment variables in it. I want to output all the lines in the text file, from a batch file, and substitute the environment variables. I'm using a for /f loop with a call to the above batch file to replace the environment variables... my only problem is semicolons in the command are throwing everything off!
I would be really surprised and grateful if anyone can solve this problem.