bool System.IO.File.Exists( string file )
returns true or false if the file exists. The file parameter can be a UNC
path, but you have to ensure you have read permissions to the directory.
if System.IO.File.Exists( txtInput.Text ) = true Then
'the file exists
else
'the file does not exist
end if
bill
"MrMike" <Mr****@discussions.microsoft.com> wrote in message
news:63**********************************@microsof t.com...
This is a tough one, but here goes.
I have a webform textbox where users input a filepath. For example:
\\servername\sharename\file.xls. Is there anyway that I could use VB code
to verify that the filepath and filename are valid after the user has input
them? Basically this would serve to quality check whether or not the user
has input the correct file path.
Thanks.