Difference between revisions of "Os.rename"

From GiderosMobile
Line 6: Line 6:
 
  os.rename(oldname,newname)
 
  os.rename(oldname,newname)
 
</source>
 
</source>
'''oldname''': (string) current name of the file ''''''<br/>
+
=== Parameters ===
'''newname''': (string) new name of the file ''''''<br/>
+
'''oldname''': (string) current name of the file <br/>
 +
'''newname''': (string) new name of the file <br/>

Revision as of 10:45, 23 August 2018

Available since: Gideros 2011.6

Description

Renames file or directory named oldname to newname. If this function fails, it returns nil, plus a string describing the error.

 os.rename(oldname,newname)

Parameters

oldname: (string) current name of the file
newname: (string) new name of the file