File Validation

Blitz3D Forums/Blitz3D Programming/File Validation

Is there a way to check if a file actually exists before your program attempts to load it (e.g. a BMP or suchlike)...?

If Filetype("MyFile.txt")=1 Then

Ace, thank you - for some reason I kept using FileExist... :)

Also, if you do load it and the file doesn't exist it will return a handle of zero ie:

myimagehandle=loadimage("a bitmap of some sort")
if myimagehandle=0 then runtimeerror("bitmap does not exist")