0

Hi,

Can somebody let me know how to check whether particular network drive is mapped or not e.g x:\\share1\share2?

Regards,
Rana

3
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by rana03
0

Are you asking how to check that it's mounted from the system that's accessing it? This is pretty simple and just a matter of trying to access the drive. If you're looking for a simple command line to do it I suppose just running CD X (X being the letter assigned to the newtork drive) would do the job, since you should get an error if the drive isn't accessible.

0

or try

$dir = "x:\\share1\\share2";

if (-d $dir);
{
   print $dir," exists\n";
}
else 
{
   print $dir," not found\n";
}

.

This question has already been answered. 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.