Robocopy skipped files

I want to use robocopy to copy a directory structure on a windows 2003 server to an external hard drive.  I have the job scheduled to run nightly and each night I want the external hard drive to have an exact copy of what is on the server.

My robocopy command is:
robocopy "path here to the top-level folder" "path to the external drive" /E /COPYALL /PURGE /Log: "path to log file"

When I look at the log I see
Dirs - 0 copied 981 skipped
Files - 10 copied 20708 skipped
Bytes - 80 copied 7.098 skipped

Why is it skipping files at all?  COPYALL should copy everything and skip nothing.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Files that have already been copied would be skipped because the archive bit is set.  Could that be what's happening for your job?
Close, but not quite correct, sorry.
robocopy doesn't care about the Archive bit by default; it has its own "file classes" (CHANGED, NEWER, OLDER, EXTRA, LONELY, SAME, TWEAKED).
The file class determines whether a file is copied or not; a "SAME" file (same size and date in source and destination) isn't copied *by* *default*; you'd have to add "/IS" (Include Same) if you insist on copying every file every time.

As long as you don't see any files under "Failed" in the job summary, you should be fine.
If you want to automatically verify whether the robocopy job ended successfully, check the errorlevel; typically, only an errorlevel of 4 or higher indicates a serious error. EXTRA files are files that exist in the destination, but not the source; these files will be deleted if robocopy is run with /purge or /mir.

Check out robocopy.doc in the installation folder of the W2k3 Resource Kit for details.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Thanks for the clarification.
Redefining Cyber Security w/ AI & Machine Learning

The implications of AI and machine learning in cyber security are massive and constantly growing, creating both efficiencies and new challenges across the board. Join our webinar on Sept. 21st to learn more about leveraging AI and machine learning to protect your business.

Steve KnightIT ConsultancyCommented:
It is skipping the files that match the time/date/size of the destination ones.

The /copyall option just means to copy the various attributes such as timestamps etc.  The full list is:

( D=Data, A=Attributes, T=Timestamps).
(S=Security=NTFS ACLs, O=Owner info, U=aUditing info).
/COPYALL :: COPY ALL file info (equivalent to /COPY:DATSOU).

The /E /PURGE (which is the same as just /MIR) makes the two areas the same.

Steve KnightIT ConsultancyCommented:
Sorry, hadf that open for a while and hadn't refreshed like I thought I had!

santaspores1Author Commented:
Excellent - thank you!  That wasn't clear from the documentation (IMHO).
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Server Software

From novice to tech pro — start learning today.