• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 705
  • Last Modified:

Trying to copy Data with Robocopy

Hello Experts,

I am trying to copy data from one File server to the other. I am using RoboCopy in order to copy the data as I wanted the NTFS permissions to come with the data but it keeps on skipping the majority of files. I am using the following syntax:

net use \\localhost\ipc$ /user:domain\Administrator Password
robocopy "C:\Data_old" "\\Server2\C$\Data_old" /COPYALL /V /ETA /TEE /LOG:"C:\DATA_OLD_COPY_LOG.txt" /R:10 /W:30
net use \\localhost\ipc$ /del

On the log it is just telling me the skipped files but not why.


                Total    Copied   Skipped  Mismatch    FAILED    Extras
     Dirs :         1         0         1         0         0         0
    Files :        20         0        20         0         0         0
    Bytes :   41.57 m         0   41.57 m         0         0         0
    Times :   0:00:00   0:00:00                       0:00:00   0:00:00

    Ended : Tue Aug 21 09:37:12 2012

I am copying from a Windows server 2008 server to a WS 2008 R2

Has any body got any ideas?

1 Solution
Because you already have files in the target folder, and robocopy will (by default!) skip files that re already in the target folder (if the files have the same size and the same date).
What you're probably missing is either "/s" or "/e" to copy subdirectories under "Data_old" as well, or /mir to mirror the complete directory tree (that means as well deleting files in the target folder that aren't in the source folder anymore!).
And since you're writing to a log file, I'd recommend to add /np and remove the /eta.
i would suggest that you use SyncToy which is a utility from Microsoft and is easier than Robocopy imho.

sgarcesAuthor Commented:
I added the Switches into /e and / mir into my batch file and it worked as it should have done. Thanks alot oBdA.

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now