how to check if a file exist?
Posted: Tue Feb 17, 2004 1:47 pm
hello,
does anyone know how I can check if a file exists?
greetz,
Bernard
does anyone know how I can check if a file exists?
greetz,
Bernard
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
If FileSize(FileName$) > -1 ; file exist
Endif
@LarsG: ROFLMAOLarsG wrote:oops... sorry.. misread the docs..
I suggested Openfile(), but it will create a file if it doesn't exist..
but you can use ReadFile() I guess?!?
[edit for the n'th time :roll: ] .. or you can go for Berikco's code below.. [/edit]