static String getUsedFilename(String filePath) throws IOException { String tmp, out = ""; File file = new File(filePath); if (!(file = Ln.getFilepathCaseInsensitive(file)).getPath().equals("")) { return file.getName(); } Iterator<BSA> bsas = BSA.iterator(); while (bsas.hasNext()) { tmp = bsas.next().getFilename(filePath); if (!tmp.equals("")) { out = tmp; } } return out; }