I have a string like this (not always the same filename at the end, this is only example)
\\eabman03\edicom\Aterlasning\repstat.txt
And i want to get this
\\eabman03\edicom\Aterlasning\
So I want to strip the filename at the end of this string with Java. How do I do this most efficient way?