Forum Home
Press F1
 
Thread ID: 44880 2004-05-02 09:16:00 DOS Batch files Happy Harry (321) Press F1
Post ID Timestamp Content User
233711 2004-05-02 09:16:00 Hi all
In the past I have backed up my computer to a second computer on my home Network,
To increase the speed of the my backup, and also the network, I now backup to a seperate partition and folder on my PC, but wish to create a batch file to copy this folder to another PC.
ie Copy e:\Backups to \\Another Computer\Backups.
I then hope to put this Batch file into the Scheduled Tasks program so this is all automatic.
I have been playing around some, but with little sucess.

Any ideas please

Cheers
HH
Can
Happy Harry (321)
233712 2004-05-02 09:42:00 This could help...

www.techtutorials.info

;)
hamstar (4)
233713 2004-05-02 09:51:00 Map a drive to the other computer - say k:.

Use xcopy as below:

xcopy e:\backups k:\backups /s /m

The /s switch will copy subdirectories as well.
The /m switch (optional) will copy only new or changed files only. Don't use it the first time!
JohnD (509)
233714 2004-05-02 10:38:00 Thanks Guys

Those suggestions got me a lot further down the track to my goal as it does copy the data where I want it to go
How then do I add a switch of some sort to the batch file to write over the files the 2nd time the batch file runs.
At the moment, keyboard input is required to do this and so will not run unattended.

Thanks in anticipation

Cheers
HH
Happy Harry (321)
233715 2004-05-02 10:56:00 It's a bit difficult sitting at my Linux box - but have a look at your DOS help and I think you might find the switch is /y.

In fact have just confirmed this by looking at:
www.computerhope.com
JohnD (509)
233716 2004-05-02 21:21:00 Thanks John D

Have had a lok at that site and it has some good info

Cheers
HH
Happy Harry (321)
1