|First, what constitutes "same filename". Does that include path? Or just that filename in any path location?|
Second, are filenames trust-able? (ie: is the filename alone, and not the content, enough to make a match). If you need to compare file's contents, then you need to run fsum on all files on both drives (or do a binary compare of each file, which I believe would take a while.)
I would assume you intend "filenames trust-able" and path "not an issue". If that were the case, it's maybe not too hard. First, build a text-list of all filenames on both drives, then maybe use FINDSTR /G
using list#1 against list#2, deleting any "fails" from the #1 drive, then regenerate the #1 disk list and work it the other way (using list #2 against the refreshed list #1). That would be my initial strategy. No use wasting time with code until we see which shoe hits the floor first.