Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

dos file synchronization?

i need to synchronizes files from one dir to another. but i only want to copy the files that have newer timestamps. is there anyway to do that in dos?

1 Answer

Relevance
  • piquet
    Lv 7
    1 decade ago
    Favorite Answer

    the dos command 'xcopy' can be used to to this.

    for all the options of xcopy, type this at the command prompt:

    xcopy /?

    specifically to do what i think you're after, the command would look something like this:

    xcopy c:\dir1\*.* c:\dir2\*.* /d:08-31-06

    the above command should copy all files in dir1 created after 31st august 2006 into dir2.

    if instead you only want to copy *newer* files you can simply do this:

    xcopy c:\dir1\*.* c:\dir2\*.* /d

    one of the advantages to xcopy over the standard copy command is that xcopy can copy subdirectories/folders too.

    you will obviously need to test my examples above, but they should be more or less correct :)

    Source(s): my brain, but if you want to read more about xcopy, see here: http://64.233.183.104/search?q=cache:_lzSyCqPPcsJ:...
Still have questions? Get your answers by asking now.