I wanted to get the list of all files from a folder on my network drive.
Something like,
\\10.151.50.50\\OfficeDocs\\
In command prompt, I could do like this:
pushd \\10.151.50.50\\OfficeDocs\\
I have to get the files under the OfficeDoc through my C# program and this is my code:
var system = System.IO.Directory.GetFiles("\\10.151.50.50\\OfficeDocs");
But, I got an exception saying Could not find a part of C:\10.151.50.50\OfficeDocs
Why the network drive is been mapped to C:\\
drive and not my network location?How to get all the files under OfficeDocs which is in my network location\\10.151.50.50
?