The Mudcat Café TM
Thread #99036   Message #3288213
Posted By: JohnInKansas
10-Jan-12 - 01:31 PM
Thread Name: Tech: Computer, Disc C Nearly Full
Subject: RE: Tech: Computer, Disc C Nearly Full
I use XCOPY routinely for backups.

If you open a command prompt (still called a DOS Window by some) and type "XCOPY /?" (without the quotes) you'll get a full description of what the command does in the Windows version you're using.

There have been changes to lots of commands in successive versions of Windows, although I haven't noticed significant ones in XCOPY up through Vista and Win7.

To backup the folder C:\Stuff I go to the drive and folder where I want to add the files, and use:

XCOPY C:\Stuff\*.* /s /c /d

The *.* is the wild card form that says "all files."

The /s says include subfolders

The /c says "continue on error."

Note that without the /c, a file that requires a password or other authorization will cause the program to terminate, and the remaining files won't get copied. With the /c it just skips that file. Encrypted files (and/or password protected ones) can't be copied or moved by any simple means except by unencrypting first, and reapplying the encryption (and/or password) after copying. (I have ONE FILE that my kid "bought" that got included in a backup years ago, and I keep it because he refuses to back up his own stuff; so I need the /c.)

The /d says "copy only files with dates later than files already on the destination drive." (i.e. copy only new/changed files.)

You can copy the files and then delete them from the original (source) drive, of course.

There is a "Move" command, (Vista doesn't recognize the "MOV" abbreviation used in older versions), that will copy to the target drive and delete from the source drive automatically. You can get the details by typing MOVE /? in the DOS Window, but for large moves I can't really recommend it until you've at least tried it for a few smaller gobs of files first to be sure you have all the switches (the /x stuff) right.

I've noticed that using Windows Explorer to Copy and Paste from one place to another (or Drag and Drop) is sometimes unpredictable when you copy whole Folders, with some contents of the folder sometimes failing to copy. This is especially true when a folder includes subfolders that contain files. You can get it done that way, but you need to be very careful about verifying that everything came across before deleting the source files.

John