?
Solved

Needing to use DOS cmd file as input to an executable

Posted on 2006-06-13
2
Medium Priority
?
200 Views
Last Modified: 2010-04-13
I am trying to use the results of a DOS command file as input to an executable.  However, the results contains an ampersand that is supposed to be next to a a string but always winds up with a space (blank character) between the ampersand and the next character.  Does anyone know why this is?  What do I do

EX: Assuming "test" was the parameter
submit file=e:\ndm\proc\XN000.cdp &SrcFile=%1;

Winds up looking like the following:
submit file=e:\ndm\proc\XN000.cdp   & SrcFile="test";

But I want it to look like the following instead:
submit file=e:\ndm\proc\XN000.cdp &SrcFile="test";
0
Comment
Question by:modotx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 43

Expert Comment

by:Steve Knight
ID: 16898722
Try escaping the & with a ^ as the & is a command seperator in NT cmd language.

Steve
0
 
LVL 43

Accepted Solution

by:
Steve Knight earned 2000 total points
ID: 16898727
i.e. use  ^& in the batch file in place of & I mean...
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
The Summer 2017 Scholarship Winners have been announced!
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

743 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