Home All Groups Group Topic Archive Search About

Open windows explorer at server path

Author
14 Sep 2006 8:53 PM
Colin Williams
I am trying to open windows explorer at a specific path on a server.
Path is not found
whe run. It works ok using a local path. How do i address a server?

Code as follows;
{
            System.Diagnostics.ProcessStartInfo exploreTest
                = new System.Diagnostics.ProcessStartInfo();
            exploreTest.FileName = "explorer.exe";
            exploreTest.Arguments ="\"\\servername\\path\\";
            System.Diagnostics.Process.Start(exploreTest);
}
Thanks
Colin Williams

Author
15 Sep 2006 7:12 AM
Vadym Stetsyak
Hello, Colin!

CW> I am trying to open windows explorer at a specific path on a server.
CW> Path is not found
CW> whe run. It works ok using a local path. How do i address a server?

CW> Code as follows;
CW>  {
CW>             System.Diagnostics.ProcessStartInfo exploreTest
CW>                 = new System.Diagnostics.ProcessStartInfo();
CW>             exploreTest.FileName = "explorer.exe";
CW>             exploreTest.Arguments ="\"\\servername\\path\\";
CW>             System.Diagnostics.Process.Start(exploreTest);
CW>  }

You're missing double "\" symbol. Server name must be prefixed with
doble "\"

So, change this line of code
exploreTest.Arguments ="\\\\servername\\path\\";
or
exploreTest.Arguments = @"\\servername\path\";

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com

AddThis Social Bookmark Button