Action
Deletes the specified file.
Syntax
SYS_RemoveFile (sFile)
Variable
|
Description
|
sFile
|
The name of the file to delete.
STRING.
|
Notes
An exception is raised if
sFile is a directory and not a file.
Windows Platforms
SYS_RemoveFile is executed by the Agent process, not the
Silk Test Classic process.
To affect the host process, use the function with the hHost notation or machine handle operator. For more information about the machine handle operator and hHost, see
Machine handle operator.
Example
[ ] const sOrigFile = "gui.t"
[ ] const sNewFile = "gui.tmp"
[ ] SYS_CopyFile (sOrigFile, sNewFile)
[-] if (SYS_FileExists (sNewFile))
[ ] Print ("File was copied")
[ ] SYS_RemoveFile (sOrigFile)
[-] else
[ ] Print ("File not found")