>>>>>>>>>>>>>>>>>>>>>>>>
I would like to check whether a particular file exist in
the hard disk. How should the syntax be like? Pls advise, thanks.
Eg: Check whether the "autoexec.bat" exist in the C:\ root directory.
>>>>>>>>>>>>>>>>>>>>>>>>>
Public Function FileExists(strFileName as string) as boolean
if dir(strFileName) = "" then
FileExists = False
else
FileExists = True
end if
end function
' ... Then, check if FileExists("C:\autoexec.bat")
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell