Home  |  Programs  |  Tips & Tricks  |  Subs & Functions  |  Links  |  Laz's Liberty Basic Site


CheckFile Function

Call the Sub like this:
TestFile = CheckFile(CompletePath)

TestFile = 0 if the files doesn't exist
TestFile = 1 if the file does exits
You need to put the functions "GetFile" and "GetPath" in your program to use this function


function CheckFile(path$)
'see if file exist
fname$ = GetFile$(path$)
pathc$ = GetPath$(path$)
CheckFile = 0
files pathc$, fname$, info$()
inf = val(info$(0,0))
if inf > 0 then CheckFile = 1
end function

Hosted by www.Geocities.ws

1