IMO, the best and easiest way is to simply use the API function.
It returns 0 if the file/folder doesn't exist. There's also PathFileExistsW if you're dealing with Unicode. I use this function extensively, it works fine in VB. Just pass the full directory info.Code:Public Declare Function PathFileExists Lib "shlwapi" Alias "PathFileExistsA" (ByVal pszPath As String) As Long If PathFileExists("C:\whatever.wtv") Then




Reply With Quote