FileNameTake
WMA link
FileNameTake["file"]
- returns the last path element in the file name name.
FileNameTake["file", n]
- returns the first n path elements in the file name name.
FileNameTake["file", $-n$]
- returns the last n path elements in the file name name.