Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

batch file assistance 3

Status
Not open for further replies.

Waidesworld

Technical User
Oct 1, 2002
121
US
I have a batch file with some of the following commands:

xcopy \winnt c:\winnt /e/i/h
xcopy \temp c:\temp /e/i/h
c:
cd program files
md mfs
xcopy \mfs c:\program files\mfs /e/i/h
cd..

But the contents of the MFS folder don't copy across. Is it simple? yeah if you know it, but alas not for me.
 
Not sure its related to Unix ...
Anyway, even in windoz, when you play with pathname containing embedded space, you have to use quotation marks:
xcopy \mfs\*.* "c:\program files\mfs\" /e/i/h

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
But why do the first two xcopy's work with no problems and the third one doesn't. That is what I am not seeing
 
Have you read my post ?
When you play with pathname with embedded space, surrount 'em wit double quotes.
So in your script you've two lines to amend:
cd "program files"
and
xcopy \mfs\*.* "c:\program files\mfs\" /e/i/h

And how is this thread related to -General UNIX discussion ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Code:
xcopy \mfs c:\program files\mfs /e/i/h

So... the command you're giving is xcopy. It's taking 3 arguments:

1) \mfs
2) c:\program
3) files\mfs

(Reread those)

and some options (/e/i/h).


(Star to PHV for having to answer twice.)
 
Sorry Guys I read it last night and it went straight over my head. I was tired from traveling. I put it in the General Unix discussion group as I thought it was one of the better places I would get an answer.

Stars appropiately awarded.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top