SyntaxFix
Write A Post
Hire A Developer
Questions
Using FilenameUtils in Apache Commons IO :
FilenameUtils
String name1 = FilenameUtils.getName("/ab/cd/xyz.txt"); String name2 = FilenameUtils.getName("c:\\ab\\cd\\xyz.txt");