• We should now be fully online following an overnight outage. Apologies for any inconvenience, we do not expect there to be any further issues.

need to make a bat file to backup folders to second harddrive

tooltime

Golden Member
Oct 26, 2003
1,029
0
0
do you know where i could find the instructions to make a batch file to backup some folders to a second disk? all i know is you can type the code in notepad and save it as a .bat

as an example i would copy the user documents folder on c to same named folders on d
 

horhey

Member
Dec 23, 2003
102
0
0
I would use in the bat file.
xcopy C:\Documents and Settings D:\Documents and Settings /s /e /h

the xcopy command at microsoft
xcopy link
 

teething

Junior Member
Oct 18, 2002
13
0
0
where would this file need to be placed in order to occur every time Windows loads? sort of 'scheduling' the backup?
 

stephbu

Senior member
Jan 1, 2004
249
0
0
If you're using XP, you might want to investigate using the integral NTBACKUP utility (you'll find it under Start, All Programs, Accessories, System Tools)

Using NTBACKUP you can build jobs to perform more complex tasks such as incremental backups and registry backup, it is also more robust against issues like files being in use.

The backup program can also be scripted to execute jobs by Task Scheduler.
 

Abzstrak

Platinum Member
Mar 11, 2000
2,450
0
0
if U go the batch file route, use robocopy...

example use to copy from c:\crap to d:\crapbak

robocopy c:\crap\ d:\crapbak\ /e /z /eta /r:3 /w:3 /ox

cool thing about the /ox is its only for changed file, so it will go through and only copy the files that have changed since the last copy, thereby greatly reducing the time of the backup.

do a robocopy /? for a full listing of switches.

You'll need to download robocopy, its a free tool from Microsoft, just google it
 

horhey

Member
Dec 23, 2003
102
0
0
if you use xcopy you can use the "xcopy /d" command.

From Microsoft.
//d[:mm-dd-yyyy]
Copies source files changed on or after the specified date only. If you do not include a mm-dd-yyyy value, xcopy copies all Source files that are newer than existing Destination files. This command-line option allows you to update files that have changed.

That will copy all files newer than the destination file.