How to rename a file in Java?

Hi,

What is the code for renaming a file?

How to rename a file in Java?

Thanks

View Answers

April 16, 2017 at 9:09 PM

Hi,

You can use the renameTo() method for renaming a file or directory.

Check tutorial at Rename the File or Directory in Java.

Thanks









Related Tutorials/Questions & Answers:
Advertisements