| | |
How to check whether network drive is mapped or not
Please support our Perl advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Jun 2008
Posts: 568
Reputation:
Solved Threads: 34
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.
-This post is provided without warranty, emotion, or a conscience. Hope it helps-
*I'm an egomaniac: I love reputation points*
*I'm an egomaniac: I love reputation points*
or try
.
perl Syntax (Toggle Plain Text)
$dir = "x:\\share1\\share2"; if (-d $dir); { print $dir," exists\n"; } else { print $dir," not found\n"; }
.
Last edited by jephthah; Apr 20th, 2009 at 3:08 pm.
![]() |
Similar Threads
- network drive mapping (Networking Hardware Configuration)
- Debian wifi config. (Networking Hardware Configuration)
- USB memory unrecognized (Windows NT / 2000 / XP)
- Accessing network share programmatically (Visual Basic 4 / 5 / 6)
- Creating and copying folders and files (C++)
- Multi-user program issues (VB.NET)
Other Threads in the Perl Forum
- Previous Thread: New to Perl HELP.
- Next Thread: How to convert text file to binary file and Binary to text using perl
| Thread Tools | Search this Thread |






