Delete
Delete is used to delete files on the hard disk.
Syntax
Delete (path to file)
More Information
You must be connected to the machine before you can delete the file.
NOTE
Do not open a file that you are deleting. Otherwise the file becomes locked and the Delete operation fails.
Returns
True if the delete operation succeeds, False otherwise.
Example
This script deletes the file (test.txt) on the local C drive if it exists:
Function Main
Dim textfile As Object
Set textfile = File.Connect("127.0.0.1")
If textfile.Delete("c:\test.txt") = true Then
echo("File Deleted Successfully")
else
echo(“Delete Failed”)
End If
End Function