Page 1 of 1

base:DeleteFile()

Posted: Wed Apr 15, 2015 10:37 pm
by djrikki
Okay I will start with this simple one first my long list of functions I use again and again:

Attempt to delete a file and return whether it succeeded or not.

Code: Select all

Global base
base = {}

Function base:DeleteFile(filename$)
    Local err
    ExitOnError(False)
    If Exists(filename$) = True
        err = False
        DeleteFile(filename$)
    Else
        err = True
    EndIf
    ExitOnError(True)
    
    Return (err)
EndFunction