To rename a file or folder in Java you can use the following snippet.
Sample Java
File source = new File("oldDirectoryOrFilePath"); File target = new File("newDirectoryOrFilePath"); boolean done = source.renameTo(target); if (!done) { // renaming failed }
RT @CodeSnippetsNET: How to rename a file or folder in #Java http://t.co/LdMjZWlAO9 #programming #code #coding #dev
RT @CodeSnippetsNET: How to rename a file or folder in #Java http://t.co/LdMjZWlAO9 #programming #code #coding #dev