Model 2601B-PULSE System SourceMeter Instrument Reference Manual Section 11: TSP command reference
2601B-PULSE-901-01A April 2020 11-151
Also see
Status model (on page 15-1)
waitcomplete() (on page 11-393)
os.remove()
This function deletes the file or directory with a given name.
Usage
success, msg = os.remove("filename")
A success indicator (true or nil)
A message value (nil or an error message)
A string representing the name of the file or directory to delete
Details
Directories must be empty before using the os.remove() function to delete them.
If this function fails, it returns nil (for success) and an error message string (for msg).
Example
Delete the file named testFile.
Also see
os.rename() (on page 11-151)
os.rename()
This function renames an existing file or directory.
Usage
success, msg = os.rename("oldname", "newname")
A success indicator (true or nil)
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).