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
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).
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!).
Summary: Hi.. can anyone help me how to create a log file(in csv format) in one line of different information.. for example: 02/23/2003 14:00:00 DOS.txt 02/23/2003 14:02:55 where: 02/23/2003 14:00:00 - start...
Summary: Hi, You said: "Hi. I have a deep directory tree. for example: c:\0001 c:\0002 c:\0003 c:\0004 Does anyone know how I can copy all of the files that start with T?" Looks like your tree is WIDE, not DE...
Summary: Hi there I have a batch file that exports my servers registries everyday as a scheduled job. Sample: regedit /e c:\server name.reg Now the problem is that I do not want to overwrite the current file ...