Computing.Net > Forums > Programming > Bat incremental Backup/duplicate folders

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.

Bat incremental Backup/duplicate folders

Reply to Message Icon

Name: natess44
Date: May 18, 2009 at 10:06:40 Pacific
OS: Windows XP
Subcategory: Batch
Comment:

Hi I've been trying to create a bat file that will copy a series of folders and files to another folder and duplicate the folders exactly as they were but without copying everything over and over again, and without any user input. I just want it to do it's job and go away. I want it to be able to compare the 2 folders and delete any files that have been moved from one folder to another in the original.

I don't know if this will help but this is my bat file so far.

set home=%~d0
%SystemDrive%
cd %USERPROFILE%\"My Documents"\
cd Test
echo n|xcopy *.* %home% /s
%home%



Sponsored Link
Ads by Google

Response Number 1
Name: RTAdams89
Date: May 18, 2009 at 10:26:42 Pacific
Reply:

I don't think you can do it with the built in batch functions. Try taking a look at mirror (http://www.snapfiles.com/reviews/Mirror/cmdmirror.html) it's a single EXE file, and if you copy it to your Windows directory, you can use the command "mirror dir1 dir2" in a batch file to mirror the contents of dir1 to dir2 as you described.

-Ryan Adams
Free Computer Tips and more:http://RyanTAdams.com

Paid Tech Support: Black Diamond


0

Response Number 2
Name: natess44
Date: May 18, 2009 at 10:51:08 Pacific
Reply:

Well I have a few ideas I just don't know enough about batch programming to do it.. one idea was to make a text file for each directory using the dir command like this:..

dir /s /b >>file list.txt

and then some how edit the text file with the pipe command adding the Xcopy command to all the lines and the destination and then use the text file to copy the files. After that I would use the other text file on the backup drive to compare the files on the 2 drives and delete the ones I don't want.. Although that program you have sent the link for will work.. I wonder if there is a way haha..


0

Response Number 3
Name: natess44
Date: May 18, 2009 at 19:35:44 Pacific
Reply:

That program didn't work. It appears to have some sort of folder name limitations.. I also found another program like it but it too has the same limitations.. so I got fed up and downloaded Allway Sync, it has some limitations on the free version but it does what I want.. it still would be nice if it could be done with a bat file though.


0

Response Number 4
Name: RTAdams89
Date: May 18, 2009 at 21:28:29 Pacific
Reply:

Not sure what limitations you have with the program I linked to. I have been able to use it to successfully mirror multiple folders/subfolders.

-Ryan Adams
Free Computer Tips and more:http://RyanTAdams.com

Paid Tech Support: Black Diamond


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Bat incremental Backup/duplicate folders

Bat. get input file folder? www.computing.net/answers/programming/bat-get-input-file-folder/16797.html

Backup Only Modified or New Files www.computing.net/answers/programming/backup-only-modified-or-new-files/20154.html

%windir% or %systemroot% ? www.computing.net/answers/programming/windir-or-systemroot-/12300.html