DeleteFile Procedure
Deletes a file.
If the file does not exist, this procedure returns successfully.
Declaration
sub DeleteFile(filePath as String)
Parameters
- filePath as String — Path and filename.
Possible error codes
- ERR_ACCESS_DENIED
- ERR_IO_FAILURE
- ERR_PATH_IS_DIRECTORY
- ERR_PATH_TOO_LONG
Example
Code
WriteFileText "myfile.txt", "Hello!"
DeleteFile "myfile.txt"
DeleteFile "myfile.txt"