Err Msg: "The network name was deleted" w/ DIR in Batch File

Last reviewed: March 24, 1997
Article ID: Q148657
The information in this article applies to:
  • Microsoft Windows NT Workstation versions 3.5 and 3.51
  • Microsoft Windows NT Server versions 3.5 and 3.51

SYMPTOMS

When you use the command NET SHARE in a batch file to delete an existing share and recreate the same share under a different name, and then use the DIR command in one of the directories on that share, the following error message pop-up dialog box appears prompting you to choose OK before the batch file can continue:

   CMD.EXE-System error
   The network name was deleted
            OK

Here is a batch file example:

Assume there is a directory A shared under the name B on the local computer where the batch file is running:

   NET SHARE B=d:\A
   DIR \\<server name>\B\<directory_name>
   NET SHARE B /d

This batch file runs fine the first time, but generates the error message above when you run it the second time.

In the Virtual DOS Machine (VDM) window the following error message appears:

   The name specified is no longer available.

CAUSE

CMD.EXE caches the file handle for the old network share and fails to update it when the share is recreated.

STATUS

Microsoft has confirmed this to be a problem in Windows NT version 3.51. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words: prodnt
Keywords : kbbug3.51 kbnetwork ntdosap ntnetserv
Version : 3.5 3.51
Platform : WinNT


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 24, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.