Open windows explorer at server path

C

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
 
V

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top