Executing one Winbatch program with another using RunWait

I am using a Winbatch script to execute another Winbatch script using the RunWait() statement. When I pass the other Winbatch program a parameter with an embedded blank it doesn't work. The parameter is a path which allows embedded blanks in the level of Windows I am using, but not I guess in the parameter variable. RunWait takes its parameters in the form %LogPath% where LogPath is assigned a string value of the path. How do I get RunWait to take the path as a single unit instead of multiple parameters when there are embedded blanks in the path contained in the variable LogPath?
BraveLadAsked:
Who is Participating?
 
jphillips247Commented:
Then delimited it with tick marks instead like '"hello world"' would result in the string being set to "hello world".
0
 
AlexFMCommented:
Did you try "%LogPath%" ?
0
 
BraveLadAuthor Commented:
Yes. It didn't work and honestly I did not expect it to since, that would make the parameter a constant and not a variable I thought. I guess I was right.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
jphillips247Commented:
Enclose the value in Quotes, or tick marks.
0
 
BraveLadAuthor Commented:
What is the syntax in Winbatch to do this?
0
 
BraveLadAuthor Commented:
If I assign a string value enclosed in quotes in Winbatch, it only puts in what is inside the quotes in the variable. How do I get the quotes in the string in Winbatch?
0
 
BraveLadAuthor Commented:
Jphillips247, thank you. That worked. It was the lack of literal quotes in the string that caused the difficulty. There is a StrCat() function that also worked as well as your suggestion. This is a technique available in several languages, alternate forms of quotation in the syntax. So if you have single quotes and double quotes as alternates, then to get the other in its literal way included anywhere in the string, just enclose the whole in the alternate quote character to the one you wish to appear literally.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.