rename a file
Rename(old, new, opts)
string; source filename
string; destination filename
(optional) options as described below
force=one of true or false
The optional argument force controls Rename's behavior when a file named new already exists. If force=false then an error is raised and the renaming does not occur. This is the default behavior. If force=true then the file is replaced by the renaming.
The Rename(old, new) command moves the file old to the new location new.
The Rename function does not return anything.
If either new or old refers to an open file, it is automatically closed before the move.
The optional argument force controls the behavior when the file new exists.
If the user does not have permission to perform the operation, an exception is raised.
FileToolsTextWriteLine⁡testfile,this is a test
The file "testfile" cannot be read because it has been renamed.
Error, (in fopen) file or directory does not exist
this is a test
Download Help Document