Our website loads in split second powered by Schema Theme. Thanks to MyThemeShop

Rename a File in Java

To rename file name, we use  renameTo() method in file. Call renameTo() method on old file handle and pass new file handle to the method as parameter. Using renameTo() method we can also move file from one directory to the other desired directory by changing File Path.

Rename a File