synchronise 2 folder structures using batch

Nt / Batch
October 26, 2009 at 05:32:43
Specs: Windows XP
I have 2 directory structures (FOLDER_A and FOLDER_B) containing files and subdirectories.

I have a text file with a list of the files (full path names) from the 2 structures divided up into the following 3 lists:

LIST#1: files with same name that exist in both FOLDER_A and FOLDER_B but have different content.

LIST#2: folders and files that exist only in FOLDER_A

LIST#3: folders and files that exist only in FOLDER_B

What I need is a batch file that can do the following:

OVERWRITE FOLDER_A files in LIST#1 with FOLDER_B files.
COPY files in LIST#3 from FOLDER_B over to FOLDER_A

Can anyone help with this please?


See More: synchronise 2 folder structures using batch

Report •

November 8, 2009 at 08:44:03
Have a look at XCOPY, XXCOPY and ROBOCOPY
I would think you can do what require, via these commands (with the correct parameters of course)

Just a question, but aren't you doing a full synch, from FOLDER_B to FOLDER_A ???

Because, you are updating all different files, and removing the files that would only exist in FOLDER_A ... that sounds like synching to me. Check the CLONE option of XXCOPY, or similar options with ROBOCOPY

Report •
Related Solutions

Ask Question