Skip to content

File_DelFile

Deletes specified file

File_DelFile(sFile, bForce) As Boolean

File to remove

True also deletes the file if it’s read-only.

  • 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.
If bStatus then bStatus = File_DelFile("C:\CapaInstaller.txt", True)

Scripting Guidelines

File_CreateEmptyFile File_DelTree File_ExistFile Constants Package Property Variables