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