find and copy files

This commit is contained in:
2015-12-13 08:52:28 +01:00
parent 0f14968bfe
commit 32fdd1d09f
@@ -39,12 +39,17 @@ public class FindAndCopyFilesFromList {
else {
files++;
if (lines.contains(file.getName())) {
FileUtils.copyFile(file, new File(targetDir));
log.info("Copy '" + file.getPath() + "' to '" + targetDir );
FileUtils.copyFile(file, new File(targetDir, file.getName()));
copiedFiles++;
lines.remove(file.getName());
}
}
}
System.out.println("Copied " + copiedFiles + " files from " + dirs + " directories with " + files + " files.");
System.out.println("Could not find the following files:");
for (String name : lines)
System.out.println(" " + name);
}
public static void main(String[] args) {