WMA link
FileNameDrop
path = FileNameJoin[{"a","b","c"}]
FileNameDrop[path, -1]
A shorthand for the above:
FileNameDrop[path]