dir function replacement

  • Thread starter Thread starter starbuck
  • Start date Start date
S

starbuck

Hi

This function in vb6 would return true if the directory existed.

Function IsDir(ByRef d As String) As Boolean


Try

d = Trim(d)

If Not Right(d, 1) = "\" Then d = d & "\"

If Not Dir(d, vbDirectory) = "" Then IsDir = True

Exit Function

Catch

End Try

End Function

In vb.net it returns false if the directory exists but it is empty, is there
a alternative in vb.net?

Thanks in advance
 
* "starbuck said:
This function in vb6 would return true if the directory existed.

Function IsDir(ByRef d As String) As Boolean

'System.IO.Directory.Exists'.
 
Back
Top