File Validation

Blitz3D Forums/Blitz3D Programming/File Validation

thalamus(Posted 2006) [#1]
Is there a way to check if a file actually exists before your program attempts to load it (e.g. a BMP or suchlike)...?


RGR(Posted 2006) [#2]
If Filetype("MyFile.txt")=1 Then


thalamus(Posted 2006) [#3]
Ace, thank you - for some reason I kept using FileExist... :)


Matty(Posted 2006) [#4]
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")