The System.IO.DirectoryInfo.Exists
always return false if i am giving a UNC like this \\\\192.168.0.33\\Others (F)
.
and it occurs only when I r
See How Can I Determine if a Folder Exists on a Computer?
To access UNC file, you need to first connect to the network location by providing credentials and opening the connection to the network share, after that you can run DirectoryInfo.Exists
Look into P/Invoke to WNetAddConnection2 / NetUseAdd and pass the username/password- then you should be able to access the file / folder info.
Edit:
Try this class I made to connect to UNC paths: http://www.mediafire.com/?77ae4ratoqa7s4b
Try System.IO.Directory.Exists()
.
It should work. My guess is that the account that your code is running under doesn't have access to the UNC path.