Given a File dir I need to find the highest numeric file name(if any exist) My approach: // get the highest numeric file name(as int) from given directory public static final int getHighestNumericFileName(File dir) { int result = -1; for (File f : dir.listFiles()) { String name = f.getName(); name = name.substring(0, name.indexOf('.')); if (StringUtils.isNumeric(name)) […]
The post Get the highest numeric file name(as int) from directory – Java appeared first on BlogoSfera.