I use this function to check whether a remote file or website exists...

VB Code:
  1. Public Function CheckURLExists(ByVal site As String) As Boolean
  2.         Dim Success As Boolean
  3.         Dim objUrl As New System.Uri(site)
  4.         Dim objWebReq As System.Net.WebRequest
  5.         Dim objResp As System.Net.WebResponse
  6.         objWebReq = System.Net.WebRequest.Create(objUrl)
  7.         Try
  8.             objResp = objWebReq.GetResponse
  9.             objResp.Close()
  10.             Success = True
  11.         Catch ex As Exception
  12.             Success = False
  13.         End Try
  14.         objWebReq = Nothing
  15.         Return Success
  16.     End Function
But this does will not work when checking whether a remote folder exists (it produces a 'forbidden' error with no exception thrown). Does anyone have a function/sub for this?

p.s. I have been searching MSDN for info but cant find anything.