Trouble copying a folder from my computer to another network computer using ROBOCOPY

2

I am trying to write a batch file to copy all files and subfolders in a folder from my local machine to another machine on our network. I am trying to use the ROBOCOPY command and would like the command to either copy the files to an existing folder on the network machine, or create this folder should it not exist.

I am currently trying to get this to work in command line before writing my batch file as a means of testing but when running the ROBOCOPY command in command line to copy into a new folder I am getting an error of

"Error 5 (0x00000005) Creating Destination Directory \\servername\TEST\new folder\ Access is Denied"

When running the command to copy into an existing folder I get several errors, a few of the above errors (as the folder I'm trying to copy has subfolders), and for the files that are not in subfolders I get the following

"Error 5 (0x00000005) Accessing Destination Directory \\servername\TEST\existing folder\ Access is Denied"

"Error 5 (0x00000005) Changing File Attributes \\servername\TEST\existing folder\ Access is Denied"

I think all security and sharing properties are set up correctly (I can't say for sure as I don't know a whole lot about network settings, so feel free to add instructions if you think this will solve my issue)

The commands I have been trying are:

robocopy "D:\Test Program" "\\\servername\Test\new folder" /s /e /copyall /mir

robocopy "D:\Test Program" "\\\servername\Test\existing folder" /s /e /copyall /mir

Any ideas?

networking
command-line
batch
asked on Super User Jun 8, 2011 by Vermin • edited Aug 2, 2011 by Gaff

1 Answer

1
  1. Try to Run this Batch File using Administrator Privileges
  2. Make sure the privileges on the Destination is accepting the application privilege

    • Suggestion :

    • If you are using the source and destination in a private server, make sure you set the READ/WRITE/FULL Control for Guest/ALL Users. After you've completed your copying, then set the permissions back to default . ( do this if you are doing this process only a couple of times not really a go if its done everyday )

answered on Super User Jun 8, 2011 by Vivek

User contributions licensed under CC BY-SA 3.0