We help IT Professionals succeed at work.
Get Started

Batch File to Disconnect and Reconnect network Drives

CCG9980 asked
Last Modified: 2010-04-21
I am currently trying to configure a solution to a problem I am having with NTBackup (Don't laugh customer doesn't want other solutions)

Currently half the backups i try to schedule and run fail. giving me 20 different types of errors of why it didn't run.  What i have found out is when i try to kick one off manually and disconnect and reconnect the network drive letter that I am backing the files to it works like a champ.

I am using a Dell RD1000 80gig Tape system on a 5 day rotation.

When i try to use a batch file to disconnect and reconnect the drives using Net Use it works fine but I want to eliminate all possibilities of a failure before i try to implement the solution into place.  I want to force Net Use to ALWAYS disconnect the drive no matter if it is in use or not.  My backups are failing as it is so it usually doesn't get written to or opened by any machine.  When i try to test and run my batch file while i have the Drive open on any machine it always hangs and i need to input a y or n for an answer.

Is there anyway to force Net Use to run quietly and force the unmount of the drive regardless of the situation???

The servers i am backup up are two Win 2k servers, over the network. The RD drive is installed locally on a third win2k server (Which doesn't error on its backup)

Open in new window

Watch Question
IT Consultancy
This problem has been solved!
Unlock 2 Answers and 7 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE