DeleteFile()

Example 1:

To delete a text file named UserInfo.txt and show a warning box on screen, use the following syntax:

DeleteFile("C:\\Users\\UserInfo.txt",true)

Example 2:

To check if the file has been deleted, check that the Return Value is true. If the Return Value is false then the file was not deleted and you can run the list of statements under the else function

FileToDelete = "C:\\Users\\UserInfo.txt"
if (DeleteFile(FileToDelete,true))
{
 // if file is deleted run these statements
}
else
{
 // if file is NOT deleted run these statements
}

Close