Using xcopy for backups

For DOS purists everywhere, you can use the Windows XCOPY command to carry out simple but effective backups as follows:

G:\BK> xcopy/s/e/d/y/r/h/c C:\*.*

This command will copy every file on C: to G:\BK and will include all subdirectories (/s) including empty ones (/e), copying only files that have actually changed (/d). It will also presume yes to any questions asked (/y), overwrite read-only files (/r), copy hidden and systems files also (/h) and continue if errors occur (/c).

Notes

  • The /c parameter is useful for when you want to skip past (system) files that are in use (normally reported as sharing violations)
  • The /d is only useful if your target disk drive has been formatted using NTFS (for me this is the most powerful and useful parameter.
  • Even though you might think that you don’t want hidden/system files to be copied, bear in mind that Windows Media Player stores the artwork images for albums and songs as hiddent JPG files so if  you leave out the /h parameter you wouldn’t necessarily be backing up everything in your music collection.

2 thoughts on “Using xcopy for backups”

  1. For the non DOS purists, maybe someone could design a simple programme to do this where the user could select the source directory, the destination directory (on your backup disc), and have all the /options as dropdown options (or tick boxes).

    Something for you to be doing during your lunch break…

  2. Non DOS purists should really be using a proper backup solution but I do take the point that it would be nice to have the “dated” copy as a feature in Windows.

    That said, some of the external hard disk drives (e.g. Seagate FreeAgent Go) do come but pretty good (and very simple) backup software that might do the trick.

Leave a Reply