?
Solved

Executing one Winbatch program with another using RunWait

Posted on 2006-05-22
7
Medium Priority
?
843 Views
Last Modified: 2008-02-26
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?
0
Comment
Question by:BraveLad
  • 4
  • 2
7 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 16740185
Did you try "%LogPath%" ?
0
 

Author Comment

by:BraveLad
ID: 16740237
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
 
LVL 3

Assisted Solution

by:jphillips247
jphillips247 earned 800 total points
ID: 16741935
Enclose the value in Quotes, or tick marks.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:BraveLad
ID: 16742303
What is the syntax in Winbatch to do this?
0
 

Author Comment

by:BraveLad
ID: 16742329
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
 
LVL 3

Accepted Solution

by:
jphillips247 earned 800 total points
ID: 16756037
Then delimited it with tick marks instead like '"hello world"' would result in the string being set to "hello world".
0
 

Author Comment

by:BraveLad
ID: 16758309
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Make the most of your online learning experience.
When you discover the power of the R programming language, you are going to wonder how you ever lived without it! Learn why the language merits a place in your programming arsenal.
Six Sigma Control Plans
Screencast - Getting to Know the Pipeline

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question