DOS xcopy help in XP - FROM Network Drive TO Local

G

Guest

have two machines. One is a desktop that functions as a kind of master file
server at home. The other is a laptop that I boogie around with.

I want to write a batch file to xcopy FROM the desktop TO the laptop.

It isn't working.

Running XP SP2
The subdirectory to copy from is called "To Copy" and is in the Shared
Documents on the server
The Shared Documents subdiretory on the server is Shared as
"\\SERVER\SHAREDDOCS"
The entire hard drive of the server is shared as "\\SERVER\SERVER" and is
also mapped as g:\ drive


What is the proper syntax for the file location?

I have tried:

xcopy \\SERVER\SHAREDDOCS\To Copy c:\DEST

xcopy g:\Documents and Settings\All Users\Shared Documents\To Copy c:\DEST

xcopy \\SERVER\SERVER\Documents and Settings\All Users\Shared Documents\To
Copy c:\DEST

and finally

xcopy g:\docume~1\alluse~1\shared~1\tocopy c:\dest



What to do?

Thanks
 
P

Pegasus \(MVP\)

RJB said:
have two machines. One is a desktop that functions as a kind of master file
server at home. The other is a laptop that I boogie around with.

I want to write a batch file to xcopy FROM the desktop TO the laptop.

It isn't working.

Running XP SP2
The subdirectory to copy from is called "To Copy" and is in the Shared
Documents on the server
The Shared Documents subdiretory on the server is Shared as
"\\SERVER\SHAREDDOCS"
The entire hard drive of the server is shared as "\\SERVER\SERVER" and is
also mapped as g:\ drive


What is the proper syntax for the file location?

I have tried:

xcopy \\SERVER\SHAREDDOCS\To Copy c:\DEST

xcopy g:\Documents and Settings\All Users\Shared Documents\To Copy c:\DEST

xcopy \\SERVER\SERVER\Documents and Settings\All Users\Shared Documents\To
Copy c:\DEST

and finally

xcopy g:\docume~1\alluse~1\shared~1\tocopy c:\dest



What to do?

Thanks

If you open a Command Prompt (which is not DOS!) and type

xcopy /? | more

then you will see this line:

XCOPY source [destination]

You have two problems in your commands:
- You keep inserting the words "to copy". The above line says
nothing about "to copy".
- You did not surround your folder names with double quotes.

Double quotes are required whenever a folder name has embedded
spaces. You can use them at all times if you wish.

Your command should look like so:

xcopy /s /y /d "g:\Documents and Settings\All Users\Shared
Documents\*.*" c:\DEST\
 
G

Guest

I'll give it a try. The "To Copy" is the NAME of the subdirectory from which
I am copying.

Thanks

Pegasus (MVP) said:
RJB said:
have two machines. One is a desktop that functions as a kind of master file
server at home. The other is a laptop that I boogie around with.

I want to write a batch file to xcopy FROM the desktop TO the laptop.

It isn't working.

Running XP SP2
The subdirectory to copy from is called "To Copy" and is in the Shared
Documents on the server
The Shared Documents subdiretory on the server is Shared as
"\\SERVER\SHAREDDOCS"
The entire hard drive of the server is shared as "\\SERVER\SERVER" and is
also mapped as g:\ drive


What is the proper syntax for the file location?

I have tried:

xcopy \\SERVER\SHAREDDOCS\To Copy c:\DEST

xcopy g:\Documents and Settings\All Users\Shared Documents\To Copy c:\DEST

xcopy \\SERVER\SERVER\Documents and Settings\All Users\Shared Documents\To
Copy c:\DEST

and finally

xcopy g:\docume~1\alluse~1\shared~1\tocopy c:\dest



What to do?

Thanks

If you open a Command Prompt (which is not DOS!) and type

xcopy /? | more

then you will see this line:

XCOPY source [destination]

You have two problems in your commands:
- You keep inserting the words "to copy". The above line says
nothing about "to copy".
- You did not surround your folder names with double quotes.

Double quotes are required whenever a folder name has embedded
spaces. You can use them at all times if you wish.

Your command should look like so:

xcopy /s /y /d "g:\Documents and Settings\All Users\Shared
Documents\*.*" c:\DEST\
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top