Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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.
DELETE FOLDER_A files form LIST#2
COPY files in LIST#3 from FOLDER_B over to FOLDER_ACan anyone help with this please?
Thanks

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

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |