I want to rename a file in the system by Scala code. The equivalent of what can be done by bash like,
mv old_file_name new_file_name
I am
See renameTo of java.io.File. In your case this would be
renameTo
java.io.File
new File("old_file_name").renameTo(new File("new_file_name"))