Rename a file: Difference between revisions

(Added Kotlin)
Line 831:
rename '/input.txt', '/output.txt';
rename '/docs', '/mydocs';</lang>
 
=={{header|Phix}}==
Windows now makes it fairly difficult to rename files in the root directory, even by hand.
Output is 0 for success, 1 for failure.
<lang Phix>?rename_file("input.txt","output.txt")
?rename_file("docs","mydocs")
?rename_file("C:\\Copy.txt","Copy.xxx")
?rename_file("C:\\docs","C:\\mydocs")</lang>
 
=={{header|PHP}}==
7,818

edits