English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This method is used to rename an existing file.
rename(oldfilename,newfilename)
oldfilename −This is the original filename.
newfilename −This is the name the file should be renamed to.
Status of the rename operation. If successful, a message will be displayed {Ok} Message.
-module(helloworld). -export([start/0]). start() -> io:fwrite("~p~n",[file:rename("Newfile.txt","Renamedfile.txt")]).
FileNewfile.txtWill be renamed to Renamedfile.txt.