Automated backup in XP home
Author
Discussion

bigjohnBOY

Original Poster:

371 posts

289 months

Monday 7th March 2005
quotequote all
I have recentley changed one of the our PC'c that stores most of our data , I used to run this batch file in windows scheduler every night.
@ECHO OFF
DELTREE /Y E:
xcopy /y c: eburgh*.* E: eburgh
xcopy /y c:derilers2*.* E:derilers2
xcopy /y c:omalk*.* E:omalk
xcopy /y c:progra~1msworksdocume~1*.* E:DOCS

Question is how can I perform the same task in XP as it does not recognise the deltree command ?

Thanks in advance

John

BliarOut

72,863 posts

269 months

Monday 7th March 2005
quotequote all
Just remove the deltree command and add the /Y switch to your Xcopy commands to allow it to overwrite existing files.

xcopy /? shows you all the options available.

Mrs Fish

30,018 posts

288 months

Monday 7th March 2005
quotequote all
James here:

Xcopy is a great batch file command do a lookup under the help centre using xcopy the full text match gives all the switches etc.

It is a very powerful tool I use it at work to back up certain servers without backup tools and it works well. It is usefull to use the the switches to keep the permissions and file dates etc for access see article 323007.

Extract as:

You can use the Xcopy command with the /O/X/E/H/K switches to copy the files and retain the existing permissions that have been specifically applied to the file or files.

These switches have the following effects:
/E - Copies folders and subfolders, including empty ones.
/H - Copies hidden and system files also.
/K - Copies attributes. Typically, Xcopy resets read-only attributes.
/O - Copies file ownership and ACL information.
/X - Copies file audit settings (implies /O).



Hope that helps...

bigjohnBOY

Original Poster:

371 posts

289 months

Tuesday 8th March 2005
quotequote all
Thanks for the prompt replies , I do love a simple fix