Grouping strings by similarity

I am looking to see if I can use similarities in file names to group together a list of files (as either a table or a list of variables) so that the most similar files are grouped together. For example, if I have file names like
Fred1a.txt
Fred2a.txt
Fred2b.txt
Fred2c.txt

I would like it to sort “Fred1a.txt” to be separate from “Fred2a.txt”, “Fred2b.txt”, and “Fred2c.txt”. I’ve tried “StringSimilarity”, but it just matches the files to themselves. I tried “String Matcher” and the same thing happened. It is not clear to me how to use the output from “String Distances” (which sounds like what I actually want). Ideally I would like to sort it into X groups in a new table, where X is a number I specify.

thank you

You can make full join for file names. Get String similarity or distance and use a clustering to group a similar names.