Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i need check if a network drive is mapped and accessible. From time to time windows displays a red X on the drive, and i would need to manually click the drive in explorer to reconnect. I already found solutions which involve editing the registry which unfortunately isn´t possible.

So i would need a batch file checking for connection, and (re-)mounting the drive. What i´m using at the moment:

IF NOT EXIST z: net use z: \\\test
share|improve this question
What problem are you trying to solve? – John Gardeniers Dec 11 '12 at 10:35

Just an idea, how about attempting to cd into the network share from within the batch script? I suspect that should connect and update the state of the network share for explorer to show that it is connected.

I suspect the registry solutions were something like the following article?

If you can't use the registry however, try the above and see if that re-establishes connection to the network share.

share|improve this answer
thanks i´ll try that. – user33958 Dec 12 '12 at 9:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.