Renames a file on the local filesystem.
This method can also be used to move a file to a whole other destination.
See Also: WriteFile, CopyFile, DeleteFile
Example - Example
function OnStart()
{
var oldfile = "test.txt";
var newfile = "test2.txt";
app.WriteFile( oldfile, "Created: " + new Date() );
app.RenameFile( oldfile, newfile );
}
from native import app
def OnStart():
oldfile = "test.txt"
newfile = "test2.txt"
app.WriteFile(oldfile, "Created: " + str(app.Date()))
app.RenameFile(oldfile, newfile)