File_DelFile
Description
Section titled “Description”Deletes specified file
Syntax
Section titled “Syntax”File_DelFile(sFile, bForce) As Boolean
Parameters
Section titled “Parameters”sFile (String)
Section titled “sFile (String)”File to remove
bForce (Boolean)
Section titled “bForce (Boolean)”True also deletes the file if it’s read-only.
Remarks
Section titled “Remarks”- The function removes the read-only attribute before it deletes the file.
- If the file doesn’t exist, the function returns True.
- If the deletion fails, for example because the file is in use, the function waits 10 seconds and tries once more. If the second attempt also fails, the function returns False.
Example
Section titled “Example”If bStatus then bStatus = File_DelFile("C:\CapaInstaller.txt", True)Related functions
Section titled “Related functions”File_CreateEmptyFile File_DelTree File_ExistFile Constants Package Property Variables