I am wanting to know how to use the copy command (or just any command) to copy a file from a network drive. I've tried..
copy \\servername\path\to\share.xls c:\local\directory
Gives:
The syntax of the command is incorrect.
Copy network file over command line?
first map the network share:
net use x: \\servername\path (where x is the unit that will be assigned)
then run:
copy x:\to\share.xls c:\local\directory
That should be all.
Reply:Try ROBOCOPY.EXE. It's a lot more robust than the CommandCom version and it is network friendly. I did not have to map the network drive to use robocopy. XCOPY may also use a qualified pathname as well but I can't test as xcopy seems not to be on my drive anymore.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment