Yes,
Try:
If System.IO.File.Exists(Filename) Then
....
... Your Code ...
....
End If
--
Regards
Simon Jefferies
Tools Programmer, Headfirst Productions
mailto:si****@headfirst.co.uk
www.headfirst.co.uk www.callofcthulhu.com
-
"Darrell Wesley" <an*******@discussions.microsoft.com> wrote in message
news:93**********************************@microsof t.com...
Is there any better method of determining if a file exists then using the
Scripting.FileSystemObject?
If I do this
Dim fs As New System.IO.StreamReader(FileName)
and the file does not exist thena n exception is thrown, how can you
determine if the file exists before attemptng to open it?