Script for backup file with extension

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
darioit
Posts: 230
Joined: 02 Aug 2010 05:25

Script for backup file with extension

#1 Post by darioit » 18 Jun 2012 03:13

hello,

I use this script for backup my data:

go.bat
start /b /low D:\go.bat mp3
start /b /low D:\go.bat jpg


go1.bat
echo off
xcopy /yisd C:\*.%1 D:\backup\%1\ >> D:\log_%1.txt
exit


I want to improve it with reverse function, I mean, when a file is deleted in original directory, I want to delete it also in backup directory.

How can I do?

Regards
Dario

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Script for backup file with extension

#2 Post by foxidrive » 18 Jun 2012 08:20

A different tool to use if you want a mirror backup is Robocopy

darioit
Posts: 230
Joined: 02 Aug 2010 05:25

Re: Script for backup file with extension

#3 Post by darioit » 19 Jun 2012 01:04

you're right I use it for my script on server at work and not for my personal data lol

Fawers
Posts: 187
Joined: 08 Apr 2012 17:11
Contact:

Re: Script for backup file with extension

#4 Post by Fawers » 19 Jun 2012 16:31

So... Solved? lol

Post Reply