0

Hi,

Am trying to check if a remote directory exists.
my string has a path "\1.1.1.1\XYZ", 1....1 being the IP address of the computer am trying to connect to,
But Directory.Exists(stringPath) returns true when I debug the application and the same code returns false from the setup exe.

Note : sharing and security for the remote folder has been given full access control.

Any help appreciated.
Thanks.

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by BobS0327
0

my string has a path "\1.1.1.1\XYZ", 1....1 being the IP address of the computer am trying to connect to,

It appears that your path string may be malformed. Also, you may have to add the hidden adinistrative share name to the path.

For example, try either one of the following in your app..

string stringPath = "\\\\1.1.1.1\\c$\\XYZ";

string stringPath = @"\\1.1.1.1\c$\XYZ";

The C$ is the hidden administrative share name for the C drive. D$ would be the hidden administrative share name for the D drive etc.

So, in the above example, you are trying to determine whether or not C:\XYZ exists on the remote computer.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.