If you have a large folder of unsorted font files, it may be difficult to identify which adhere to what family and their style names. For this a solution could be a script to go through the metadata of all the font files and rename them according to their postscriptFontName values.
Opening each file individually to figure out the value in Glyphs is very time consuming, and should not be necessary for a simple operation as this is.
Update: I ended up using automator with an mdls script tucked in the middle.
It is set up as an application which receives the files and folders that are dragged onto it. The fonts are filtered out and then launches another workflow which goes through and renames each font file.