Robocopying an entire share from server to server gets error 2

vanastr

New member
Local time
2:53 PM
Messages
1
I've run into an issue several times when trying to copy an entire share from one server to another. In this case, it happens to be from a Mac to a Windows server (just in case that's relative to the problem). The command I was using is:

robocopy \\MacDASD\Boards \\SRVRWIN78\Boards /S /FFT /XJ /R:1 /W:5 /V /TS /TEE /L

This runs fine, showing all the files and subfolders from the Mac's 'Boards' share that would have been copied. However, once the '/L' is removed to actually run the command I get 'ERROR 2 (0x00000002) Accessing Source Directory \\MacDASD\Boards. Running Robocopy for each of the subfolders under the 'Boards' share, however, works fine. It seems it just can't do the entire share at once. Any help would be appreciated.
 

My Computer My Computer

At a glance

64
Computer type
PC/Desktop
OS
64
A quick search indicates error 2 could be:
- Some Extra files or directories were detected. Examine the output log.
- The system cannot find the file specified.

You could try to increase the retry parameter from /R:1 to a higher value.

I also found this but I don't know if it's correct or not, nor if error, exit codes and errorlevel are equal values:
Note also that bit 0x02 simply indicates that there are files at the destination that are not present at the source. This will happen if the /E switch is used and files have been deleted from the source since a previous copy was taken. It should not happen if the /MIR switch is used because that should delete files at the destination to mirror the source (but I haven't tested this).
Getting ROBOCOPY to return a "proper" exit code? - Super User
 

My Computer My Computer

At a glance

Windows 7 Pro 32Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz4,00 GB (Usable 2,98)NVIDIA NVS 5100M
Computer type
Laptop
Computer Manufacturer/Model Number
HP Elitebook 8540p
OS
Windows 7 Pro 32
CPU
Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz
Motherboard
Hewlett-Packard 1521
Memory
4,00 GB (Usable 2,98)
Graphics Card(s)
NVIDIA NVS 5100M
Sound Card
NVIDIA High Definition Audio
Screen Resolution
1600x900
Hard Drives
INTEL SSDSA2CW120G3
Antivirus
F-Secure Internet Security
Browser
IE, Firefox, Opera
Other Info
Sandboxie,
SRP (Software Restriction Policy),
EMET (Enhanced Mitigation Experience Toolkit),
WFC (Windows Firewall Control by BiniSoft),
Malwarebytes Premium
I received the same issue and could not find the solution. It turns out that the default for /DCOPY is /DCOPY:DA which tries to read NTFS Stream data, and it seems that the Mac or other linux based Samba shares will not respond nicely when robocopy request that data on the root of the share. By doing /DCOPY:AT, this is avoided and the copy should go successfully.

Just wanted to share this since I was having the exact same problem when trying to copy from a Synology NAS with RoboCopy.
 

My Computer My Computer

At a glance

Windows 7 Pro 64bi
Computer type
PC/Desktop
OS
Windows 7 Pro 64bi
Back
Top