First Python script & 1st post to this forum.
I don’t know if I’m within forum standards here.
If not, kindly ignore post.
MacOS-13. Python 3.9.1_6
for each ReferenceFile in ReferenceFolder,
find MatchingFile in TargetFolder.
move MatchingFile to DestinationFolder.
All three folders are traversed recursively.
MatchingFile has same content & name as ReferenceFile (& size, hash, date).
As each MatchingFile is moved to DestinationFolder,
the original structure of TargetFolder is rebuilt (as dupeguru app does).
Dupeguru. Great app, but Mac version not updated for several years.
Auslogics duplicate finder. Great Windows app, but
transferring all APFS files to NTFS or EXFAT drive is error-prone,
especially with long paths & FN’s.
Bash command-line scripts are difficult to read/write/debug,
especially when incorporating above features.
Sometimes they don’t work on Mac.
I’ve heard Python is like Pascal – my first & best language.
Suggestions much appreciated !!