I need to check if the files contained in A folder (and its sub-folders) are present (as duplicates) in B folder or in one of its sub-folders BUT I don't want to see duplicate files present in B folder/sub-folders itself!
To make it more clear, take the following example scenario:
Folder A tree is:
A |_ DIR A1 | |_ file_a1_1 | |_ DIR A2 | |_ file_a2_1 | |_ file_a_1 |_ file_a_2 |_ a_file_not_duplicated
Folder B tree is:
B |_ DIR B1 | |_ file_a1_1 | |_ file_a_1 | |_ DIR B2 | |_ file_a2_1 | |_ file_b_1 (<= only duplicated in B) | |_ file_b_2 (<= only duplicated in B) | |_ file_a_1 |_ file_a_2 |_ file_a1_1 |_ file_a2_1 |_ file_b_1 |_ file_b_2
So each file in A folder/sub-folders, with the exception of the "a_file_not_duplicated" one, has a duplicate in B folder or in one of its sub-folders. Now, a "traditional" duplicate finder software would list me, besides of those, even the files that are duplicates on B folder/sub-folders (
file_b_2 in the example) but that are not present in A folder/sub-folders and that are the ones I don't want to be shown and that haven't to be included among the results of the duplicates list I expect.
A free software for this would be great, but I'm prepared to consider/evaluate paid one too.
Any suggestion? Thank you!
P.S. In the example I used the same file names to point out which ones had duplicates in B folder/sub-folders but, of course, the duplicates identification method has to be based primarily on file contents/checksum (as usually occurs with duplicate finders).
EDIT: I need something that can run on Windows or Linux (both if possible).
To better clarify what I'm asking here, I'm adding two graphic representation with some additional explanations:
A|B = the set of all files contained in A|B (root) folder plus all its sub-folders;
a/b n. d. = A/B set files that don’t have duplicates (unique ones);
type 1 dupes = A|B files that have (at least) one duplicate in B|A set and no duplicates in A|B set itself;
type 2 dupes = A|B files that have (at least) one duplicate in B|A set and (at least) one duplicate in A|B set also;
type 3a/b dupes = A/B files that have (at least) one duplicate in A/B set only and no duplicates in B/A set;
(Summing up type 1 & type 2 dupes = files that have (at least) one duplicate in the other “folder&sub-folders” files set and that might (or not) also have duplicates in their own “folder&sub-folders” files set.)
Another way to represent the situation is:
The darkened area represents, besides non duplicated files, the duplicate ones I don't want to be shown among results: I don't want "type 3b" duplicates, that is duplicate files contained in B plus its sub-folders and that have no duplicate in A plus its sub-folders.