[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Needing to use DOS cmd file as input to an executable

Posted on 2006-06-13
2
Medium Priority
?
202 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

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…
With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
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

649 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