arrow    Home arrow Knowledge Base arrow General arrow Need to copy files across a network? Use RoboCopy
Site Areas
Home
News
Knowledge Base
Web Links
Contact Us
Files
Terms of Use
Profile





Lost Password?
No account yet? Register
Need to copy files across a network? Use RoboCopy
Written by Terry Watts   
Thursday, 27 January 2005

If you are migrating a file server or just have lots of files to copy from one networked machine to another, then instead of using the Windows Explorer method of copying the files, why not use RoboCopy?

Robocopy is a free tool that comes as part of the Windows Server Resource Kit or as a separate download from the Microsoft site.  It is a command line tool that takes a number of parameters.  It has the ability to copy file permissions and other file attributes.  The tool can also be used to make a mirror copy of a set of folders of disk drive. 

The other great thing about Robocopy is its ability to handle files that are locked that that you don't have access to.  If you use the Explorer method and it encounters a locked file, a helpful dialog box will be displayed and the file copy process is halted.  Robocopy ignores the locked files and continues.

Robocopy also has a restart mode that allows you to interupt a file copy operation and then restart it later on.  It will scan the folders checking to see if there are any new files and then continue where it left off.

I have used RoboCopy when I am migrating fileservers, mainly because it deals with the security ACLs and locked files.

Once you have RoboCopy installed you could use the command below to replicate a folder structure.

robocopy <source> <destination> /E /Z /COPY:DATS /LOG:C:\\copylog.txt /TEE /R:0 /W:0 /ETA

So what are all of these options all about.

Hopefully the source and destination are self explainatary, although they do need to be the full path of where the files are.

/E - Copies all subdirectories including empty ones.
/Z  - Copies files in restartable mode (that is, restarts the copy process from the point of failure).
/COPY:DATS - Copies file information, Data, Attributes, Timestamp, Security
/SEC - Copies ALL NTFS security information
/LOG:<file> - Generates a log file for auditing
/TEE - Logs to file as well as to the console
/R:0 - Number of times to retry copying a locked file
/W:0 - Time inbetween retry attempts
/ETA - Displays an Estimated time remaining to copy each file.

There are more command line options that are documented in a word document that comes with Robocopy.

TIP:  Copy RoboCopy into the C:\WINDOWS folder then you can use it regardless of where your command prompt opens to.

Windows Server 2003 Resource Kit

 
go to top Go To Top go to top
This article has been printed from www.schooltechnician.co.uk and is protected under copyright.
See http://www.schooltechnician.co.uk/terms_of_use.html for further details.