Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java get filename without extension

String fname = file.getName();
int pos = fname.lastIndexOf(".");
if (pos > 0) {
    fname = fname.substring(0, pos);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #filename #extension
ADD COMMENT
Topic
Name
6+1 =