Code:
FileInfo fi = new FileInfo("\\intranet.xyx.com\abc\efg\def.txt");
if (!fi.Exists)
Console.WriteLine("Doesnt exist!");
Prints doesnt exist whereas this file actually exists. It works fine with files on my computer but.
Is the method to access this file(on the intranet) wrong.
Infact, the VB code for the same:
try
Dim dummy As String = FileSystem.Dir("\\intranet.xyx.com\abc\efg\def.txt") 'This will cause an error if file is missing
System.Console.Write("yay")
Catch ex As Exception
System.Console.Write("NAy")
End Try
Works well!!!
Any help appreciated.. !!!