How can I verify that files in one folder already exist somewhere inside another large folder on Mac?

I’m trying to organize some files on my Mac and ran into a situation that’s a little different from the usual “find duplicate files” cleanup.
I have one smaller folder that contains a few hundred loose files, and then a second much larger archive folder with thousands of files spread across lots of nested subfolders. What I actually want to do is check whether every file from the small folder already exists somewhere inside the larger archive, even if the filenames or folder locations are different.
Basically, if a matching copy is found in the large archive, I want to remove that file from the smaller folder and keep only the files that don’t exist anywhere else.
Doing this manually, file by file, would take forever. Is there a practical way on macOS to automate this kind of comparison?

This is more of a “folder comparison” task than a normal duplicate cleanup. One safe approach is to first copy the small folder somewhere else as a backup, then compare files using checksum/hash matching instead of names. That way you can confirm whether files are truly identical even if they’re stored in different locations.

You definitely don’t want to compare by filename alone here. Same name doesn’t always mean same file, especially if the archive has been reorganized over time.

I had to do something similar when consolidating old project archives. Manually searching through nested folders was impossible after a while. I ended up using iBoysoft Cleaner to scan both locations, and it was able to identify matching files based on actual content rather than folder structure. That made it much easier to confirm which files in the smaller folder were already backed up elsewhere before deleting anything.