Advertisement

03.10.2008 at 12:49PM PDT, ID: 23229699
[x]
Attachment Details

How to refresh a network share from the command prompt

Asked by sasllc in Windows XP Operating System

Our typical customer has a few XP computers that share files among each other via simple file sharing.  For example, Computer A may map to the C:\ drive of Computer B and call it drive X:.  But now and then Computer B may temporarily "lose" the connection to drive X:, and of course an easy way to refresh the connection is to go to My Computer and double click the X: drive, and then all the folders appear.

My question is how to do this "refreshing" from a command prompt.  While running a batch file using Xcopy, I need to be sure I have a good connection to drive X: so that the copy does not fail.  The only way I know of is to do this each time in the batch file:

NET USE X: /DELETE
NET USE X: \\BOB\C

But I don't know for sure if that's reliable, and I hate to have write out all the NET USE connections in the batch file and have them run each time.  Is there a better way to do this?  Some command I can run that effectively does the same thing as double-clicking that icon in My Computer?  TIA

Start Free Trial
 
Loading Advertisement...
 
[+][-]03.10.2008 at 12:59PM PDT, ID: 21089825

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Windows XP Operating System
Sign Up Now!
Solution Provided By: garethh86
Participating Experts: 2
Solution Grade: A
 
 
[+][-]03.10.2008 at 01:16PM PDT, ID: 21089974

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.10.2008 at 01:32PM PDT, ID: 21090104

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]03.10.2008 at 01:41PM PDT, ID: 21090193

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628