how can I search for folders ending in certain characters in Finder?
I haven't found a way to get variables in spotlight, but I must be misinformed since that seems so useful to not implement.

That being said, I use terminal and mdfind to parse spotlight like you have all the time.

mdfind "kMDItemFSName == '*son' &amp;&amp; kMDItemKind == 'Folder'"


That will show you all folders ending in son and you might want to grep for the "sample names" folder name to replicate the search you have illustrated or use the -onlyin command:

mdfind -onlyin dir "kMDItemFSName == '*son' &amp;&amp; kMDItemKind == 'Folder'"


You can drag the folder into terminal to get a properly escaped name with spaces encoded and then paste that in place of dir