Hi guys,
Is there a way to check if there is a network drive connected that uses a specific letter (Y: in my case)?
In order for my script to run properly it needs to mount a network drive with the letter Y:
What I have now works, but it displays an error message if the drive is not mounted.
ECHO The Y: drive needs to be disconnected in order for this script to run
pause
net use Y: /delete
ECHO Mapping network drive...
net use Y: "\\it-server\software\winsoft"
Now what I would like is:
command that checks if the drive is in use...
if Y: is in use
ECHO Y: Needs to be disconnected... Disconnecting drive now.
net use Y: /delete
if Y: is not in use
ECHO Mapping network drive...
net use Y: "\\it-server\software\winsoft"
Your help is greatly appreciated! Thanks in advance...
Martijn
