Created
September 28, 2015 12:47
-
-
Save hacksoldier/594f260f6ab4710ad8e3 to your computer and use it in GitHub Desktop.
Move file from previous to new directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void moveFile () throws IOException { | |
| File afile =new File(PDF_NAME_DIRECTORY); | |
| if(afile.renameTo(new File("C:\\dati\\newDirectory\\" + afile.getName()))){ | |
| System.out.println("File is moved successful!"); | |
| }else{ | |
| System.out.println("File is failed to move!"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment