Best code for file archive

this is a good code for archiving file:

if (idFile.renameTo(new File(archiveFileRoot + FS + fileName))) {
System.out.println(“252…successfully archived!”);
} else {
System.out.println(“254…Not archived!”);
}

never use:

if (idFile.renameTo(new File(archiveFileRoot + FS + idFile.getName()))) {

download OpenJDK:

https://www.openlogic.com/openjdk-downloads

Leave a Reply

Your email address will not be published. Required fields are marked *