DirectoryContentsList and 'Duplicates'

I need to keep track of a folder, but I need to do a couple of extra things:

Exclude some folders (trash, lost+found)

Not show duplicates - files with the same name but different extensions.

Any suggestions? I see I can do a filter, but that can’t reference the other files, can it?