DOS xcopy help in XP - FROM Network Drive TO Local
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
Pegasus \(MVP\)
07-10-2005, 12:23 AM
"RJB" <RJB@discussions.microsoft.com> wrote in message
news:96964F55-447E-4367-8848-0FE78914A06D@microsoft.com...
> 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\
I'll give it a try. The "To Copy" is the NAME of the subdirectory from which
I am copying.
Thanks
"Pegasus (MVP)" wrote:
>
> "RJB" <RJB@discussions.microsoft.com> wrote in message
> news:96964F55-447E-4367-8848-0FE78914A06D@microsoft.com...
> > 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\
>
>
>
DOS xcopy help in XP - FROM Network Drive TO Local