The Mudcat Café TM
Thread #106583   Message #2202919
Posted By: JohnInKansas
26-Nov-07 - 11:56 PM
Thread Name: Tech: Windows command?
Subject: RE: Tech: Windows command?
As Nick indicates, the XCOPY command with /D switch will copy all the files, but will only replace a file that exists in the destination if the file being copied from the source is later than the one in the destination.

If you want to just copy the files that have been changed after a certain date, for example to make a separate CD, in WinXP you can use:

XCOPY {source} {destination} /D:m-d-y

Where the m is month, d is date, and y is year.

Using the /S switch will include subdirectories of the source location: XCOPY /D:m-d-y /S

        "XCOPY C:\DOC C:\DOCNEW /D:8-1-2007 /S"

should copy all files created or changed since August 1, 2007 from C:\DOC to C:\DOCNEW.

You can get the full description of the command syntax by:

Open the Command prompt (Start|Run type "Command" (without quotes) OK or Enter, or Start|Programs|Accessories|Command Prompt.

When you get the black window, type a command followed by "/?" (again no quotes) - i.e.

        XCOPY /?

There have been some changes in syntax and functions for common commands from one Windows version to the next, so it's recommended that you check to make sure that you have the right switches for one you're not familiar with on you own machine.

If your new machine is running Vista, typing XCOPY /? will get you the syntax for the XCOPY command, and you can use it; but it will tell you that you should use "ROBOCOPY" instead. Suit yourself as to which looks best for you. (ROBOCOPY, in typical nauseatingly "cute" Vista-speak stands for "robust copy" and is new in Vista.)

John