SYS_RemoveDir Function

Action

Deletes the specified directory.

Syntax

SYS_RemoveDir (sDir)
Variable Description
sDir The name of the directory to remove. STRING.

Notes

The specified directory must exist and must be empty for it to be removed, or an exception is raised.

Windows Platforms

SYS_RemoveDir 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

STRING sTmpDir
BOOLEAN bExists
sTmpDir = SYS_GetDir () + "\tempdir"
SYS_MakeDir (sTmpDir)
bExists = SYS_DirExists (sTmpDir)
Print (bExists) // Prints TRUE
SYS_RemoveDir (sTmpDir)
bExists = SYS_DirExists (sTmpDir)
Print (bExists) // Prints FALSE