title: How to ping a mapped drive
body: <p>Hello I'm writing an application where the user can enter a directory for storing some files.</p>
  
  <p>In case he entered a directory on the mashine the program is running on, I can just use the path he entered.</p>
  
  <p>In case he entered a directory on the network like this: 192.168.xxx.xxx...,
  I can ping and if pingable use this path.</p>
  
  <p>But what if the user has a mapped drive and enteres something like Y:\work... ? The .Net Ping class has a Send method, I'm using it like this:</p>
  
  <pre><code>try{
      Ping pinger = new Ping();
      PingReply reply = pinger.Send(NetworkIP);
  } catch (PingException) {
      // Discard PingExceptions and return false;
  }
  </code></pre>
  
  <p>But if the NetworkIP is Y:\ or something it throws a PingException even if the drive should be available.</p>
  
  <p>Does anybody know how I can fix this? Maybe I can get the Ip address of the drive somehow and use it instead?</p>
  
  <p>thanks for you help</p>