Fandom

Programmer's Wiki

Renaming a file

406pages on
this wiki
Add New Page
Talk0 Share

Bash Edit

mv folder/file1 folder/file2

This is the command to move a file to a different directory. if the same directory is specified, the file is renamed instead.

Java Edit

File file = new File("file1");

file.renameTo(new File("file2"));


Python Edit

Perl Edit

See Also Edit

16px-Pencil

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.