Check if a file exists?

Blitz3D Forums/Blitz3D Beginners Area/Check if a file exists?

slenkar(Posted 2005) [#1]
How do I check if a text file exists in the current directory,
for example
"readme.txt"


JBR(Posted 2005) [#2]
I use FileSize & if 0 then i don't load.

(I suppose the file could still exist with a size 0)

Marg


Dazman(Posted 2005) [#3]
FileType is your friend


Ross C(Posted 2005) [#4]
He's not my friend... Stole my girlfriend and my house.

I try and load the file in. If the handle for the file = 0 then it ain't there :o)


Dazman(Posted 2005) [#5]
Well, i still think he's a jolly decent chap. I didn't say you couldn't have other friends too :)


_PJ_(Posted 2005) [#6]
He was my friend before he was yours. He was best man at my wedding too so ner-ner-ne-ner-ner!


Mustang(Posted 2005) [#7]
http://www.blitzbasic.co.nz/b3ddocs/command.php?name=FileType&ref=2d_a-z