7: TSP command reference Series 2600B System SourceMeter® Instrument
7-164 2600BS-901-01 Rev. C / August 2016
Also see
os.rename() (on page 7-164)
os.rename()
This function renames an existing file or directory.
Type TSP-Link accessible
Affected by Where saved Default value
Function Yes
Usage
success, msg = os.rename(oldname, newname)
A success indicator (
or
)
A message value (nil or an error message)
String representing the name of the file or directory to rename
String represent the new name of the file or directory
Details
If this function fails, it returns nil (for success) and an error message string (for msg).
Example
os.rename("testFile", "exampleFile")
Changes the name of the existing file
testFile to the name exampleFile.
Also see
os.remove() (on page 7-163)
os.time()
This function generates a time value in UTC time.
Type TSP-Link accessible
Affected by Where saved Default value
Usage
utcTime = os.time()
utcTime = os.time(timespec)
Time value in UTC time
The date and time (year, month, day, hour, and minute)