#StandWithUkraine

Master command line file copy

I have different relations with various types of utilities to copy and move files around. For example I absolutely love sync utilities but am puzzled by copy enhancers. Almost same functions but so different paradigms.

Utilities for command line file copy get mixed feelings. On one hand they are relatively complex to use, on other they are a must for advanced usage scenarios.

Why bother

For all utilities to throw files around in graphical interface there are still some major advantages to command line tools:

  • few are always bundled with Windows, which guarantees they are always around and ready to be used;
  • they tend to have support for complex and rarely implemented issues – such as preserving meta information in files and scope of user permissions;
  • they are designed to be easily integrated in scripts and play well with other software.

copy

copy /?

Copy is around since MS-DOS times. It is most basic of copy utilities and commonly available everywhere, including specific environments like recovery console.

Pro omnipresent, multiply sources to single destination.

Con primitive, focused at files and not folders.

Documentation http://technet.microsoft.com/en-us/library/bb490886.aspx

xcopy (extended copy)

xcopy /?

Designed as newer and better copy this one has more features and much more capable. It has set of keys to suppress questions (overwrites), supports skipping over errors and some basic sync-like functions.

Pro commonly present (I couldn’t find exact list of Windows versions).

Con considered deprecated since Vista release.

Documentation http://technet.microsoft.com/en-us/library/bb491035.aspx

xxcopy (boldly extended xcopy)

xxcopy /?

Third party utility that is designed to be more functional and easy replacement to native Windows ones. Hadn’t used this one myself but in seen it in many cases to be suggested and used as drop-in xcopy replacement.

Pro numerous features, easily swapped with xcopy.

Con free only for personal use, has to be copied to system for use.

xxcopy http://www.xxcopy.com/

robocopy (robust file copy)

robocopy /?

Bundled with Windows starting with Vista this one aims to replace deprecated xcopy. I guess you see the pattern by now. :)

Robocopy adds advanced options, including precise file selection (separately from source/destination), sync and network support, logging and many more.

There is also Robocopy GUI available that can be used as graphical utility or designer for command line.

robocopy_gui_interface

Pro extensive set of functions, graphical designer.

Con not bundled with earlier versions of Windows.

Robocopy GUI http://technet.microsoft.com/en-us/magazine/2006.11.utilityspotlight.aspx

RichCopy

Internal (since 2001) Microsoft tool, that was made public this year. Primarily graphical utility it also works from command lines and graphical interface can be used as script designer (see help file for specifics).

richcopy_interface

App offers most extensive array of settings, giving unmatched control over copy process, and is first to implement multithreaded copy process.

Pro most complex and powerful.

Con despite long in-the-shadows history is bit rough and bleeding edge, overkill for average user.

RichCopy http://blogs.technet.com/ken/

Overall

History of command line file copy utilities spans through many years. While there is certainly no need to be proficient with each and every one – it is good to know their strong and weak sides to be able to choose most adequate and compatible utility for the task.

Related Posts

5 Comments

  • Ishan@ILoveFreeSoftware #

    Nice compilation of command line utilities.
  • Rarst #

    @Ishan Yeah, I messed with xcopy yesterday at work and needed to flush all this CLI stuff out of my brain. :)
  • Angelo R. #

    Command line is great, but some file copy apps actually do speed up copying large amounts of data (even though they all claim that, most don't seem to deliver). I used to use Terra Copy in windows because it integrated directly into the shell. Dragging a file/folder into a different one immediately initiated TerraCopy to handle the transfer.
  • Rarst #

    @Angelo Speed is topic for another day. I am actually going to mess with that today because my sync routine with SyncExp is kinda slow when writing to notebook over WiFi. Waiting for notebook to defragment. :)
  • SS64.com – multi-platform command line reference | Rarst.net #

    [...] I’ve been messing with command line and file copy especially to automate some [...]