1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
File parentFolder = new File(parentPath);
File[] listFiles = parentFolder.listFiles();
if(listFiles != null) {
for ( int i = 0; i < listFiles.length; i++) {
// Appel récursif sur les sous-répertoires
// listeRepertoire( list[i]);
String fileWithNoExtension = FileUtil.getFileWithoutExtension(listFiles[i].getPath());
if(fileWithNoExtension != null || !fileWithNoExtension.equals(""))
{
if(fileWithNoExtension.equals(currentFileName))
{
moveFileToDirectory(listFiles[i], pj, IDefineBatch.PROPERTIES_PATH_TO_ERROR);
}
}
}
} else {
LOGGER.warn("Files do not exist in the directory " + parentPath);
} |
Partager