Software development, .Net, SQL Server, TDD, Agile, Community and other Odds and Sods
Mitch Wheat has been working as a professional programmer since 1984, graduating with a honours degree in Mathematics from Warwick University, UK in 1986. He moved to Perth in 1995, having worked in software houses in London and Rotterdam. He has worked in the areas of mining, electronics, research, defence, financial, GIS, telecommunications, engineering, and information management. Mitch has worked mainly with Microsoft technologies (since Windows version 3.0) but has also used UNIX. He holds the following Microsoft certifications: MCPD (Web and Windows) using C# and SQL Server MCITP (Admin and Developer). His preferred development environment is C#, .Net Framework and SQL Server. Mitch has worked as an independent consultant for the last 10 years, and is currently involved with helping teams improve their Software Development Life Cycle. His areas of special interest lie in performance tuning
Saturday, October 01, 2011
Windows 7: Fast and Flexible File Copy with RoboCopy
Did you know that RoboCopy is included with all editions of Windows 7? I didn’t until very recently, when a colleague (Mike Minutillo) mentioned it.
Robocopy (short for Robust File Copy) can do so much more than the standard Copy and Xcopy commands.
The basic syntax is as follows:
The source and destination parameters are specified as drive:\path or \\server\share\path. The file parameter can contain one or more literal file names, or it can use ? and * wildcards.
For instance, this command copies the contents of one folder and all its subfolders from a local drive E to a shared folder:
The /MIR switch mirrors the two folders, copying all folders (even empty ones) from the source directory and removing folders from the destination if they no longer exist on the source. The /W and /R switches set the wait and retry options; in this case, Robocopy will retry each copy up to 10 times, waiting 30 seconds between attempts. The /MT[:n] switch performs a multi-threaded copy, where n indicates the number of threads to be used (n is 8, by default) and can range from 1 to 128. The /LOG: switch logs output to the specified location.
To see the full list of options, type robocopy /? at a command prompt.
There’s even a GUI!
MSN, Email: mitch døt wheat at gmail.com