Computing.Net > Forums > Disk Operating System > How to backup only newer files

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

How to backup only newer files

Reply to Message Icon

Name: philowar
Date: September 18, 2002 at 20:22:02 Pacific
OS: DOS
CPU/Ram: P150
Comment:

I'd like to know the syntax to backup all files into another directory, overwriting ONLY the files that are newer. I want a command that I can put into a batch file. Basically, I want to be able to put in a floppy, and run the batchfile so that all files from c:\docs are copied to a:\ -- overwriting only the documents on the floppy that are older than the ones being copied from the harddrive (so that dos will skip a file copy alltogether if it sees the file it is copying is older or the same date as the one on the floppy).

Hope I explained this clearly :)

Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: tech-fred
Date: September 18, 2002 at 20:57:31 Pacific
Reply:

If you are interested in files that are new
or modified you could use xcopy *.* a: /m
see xcopy /? for more details.


0

Response Number 2
Name: Secret_Doom
Date: September 19, 2002 at 08:14:21 Pacific
Reply:

I believe tech-fred meant the /D switch, not the /M.

XCOPY /D c:\docs\*.* a:

Right, Fred?

-- Leonardo Pignataro - Secret_Doom --

secret_doom@hotmail.com
www.batch.hpg.com.br


0

Response Number 3
Name: oldsailor
Date: September 19, 2002 at 08:37:56 Pacific
Reply:

I believe that you can go either way guys;
using the 'M' switch you copy files with the attribute set and with the 'D' switch you copy files changed on or after a specified date.


0

Response Number 4
Name: Secret_Doom
Date: September 19, 2002 at 17:49:29 Pacific
Reply:

The /M switch could be used to perform something close to what philowar described, but that's absolutely not the same thing as the /D switch. What he discribed is achieved using the /D switch.

However, I now realize that Tech-fred did really mean the /M switch (right?), since that's an alternative way (not the same thing!).

-- Leonardo Pignataro - Secret_Doom --

secret_doom@hotmail.com
www.batch.hpg.com.br


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: How to backup only newer files

How to create a log file in 1 line www.computing.net/answers/dos/how-to-create-a-log-file-in-1-line/12735.html

Copy files only out of sub folders www.computing.net/answers/dos/copy-files-only-out-of-sub-folders/14795.html

How to cope with duplicate files www.computing.net/answers/dos/how-to-cope-with-duplicate-files/13175.html