MS-DOS

Moderators: blip
Number of threads: 362
Number of posts: 872

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
batch file programming Posted by rocky811 on 15 Jul 2008 at 11:46 AM
Hi ,
I actually wanted to know that if i am writing a path for copy command , its not working
Copy C:\Program Files\Projects\Input\1.IN 2.In

is it because of space between program and files ?? how should i write that in a batch file
and also i would like to know if i wanna run a .exe file writing a command in batch file how should i write that .

Report
Re: batch file programming Posted by zibadian on 15 Jul 2008 at 1:01 PM
: Hi ,
: I actually wanted to know that if i am writing a path for copy
: command , its not working
: Copy C:\Program Files\Projects\Input\1.IN 2.In
:
: is it because of space between program and files ?? how should i
: write that in a batch file
: and also i would like to know if i wanna run a .exe file writing a
: command in batch file how should i write that .
:
:
That's indeed due to the space in "program files". Whenever there's an "illegal" character in a pathname, use quotes to ensure that the path is seen as 1 part:
Copy "C:\Program Files\Projects\Input\1.IN"  2.In

All batch files are simple text files. Any executable, which can append lines to a text file, can append lines to a batch file.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.