UNC-Format Path Affects the DIR Command

Last reviewed: May 16, 1997
Article ID: Q118399

The information in this article applies to:
  • Microsoft Windows NT operating system version 3.1
  • Microsoft Windows NT Advanced Server version 3.1
  • Microsoft Windows NT Workstation version 3.5
  • Microsoft Windows NT Server version 3.5

SYMPTOMS

If you have a program item in Program Manager that points to a batch file on a remote server using a universal naming convention (UNC)-specified path and the batch file executes a DIR command followed by any parameter, when you start the program item, the following error message appears:

   The system cannot find the file specified.

After running the batch file, if you execute a DIR command with any parameter from the command line, you will receive the same error message.

However, executing a DIR command on a remote directory using a UNC- specified path as follows does not return an error:

   DIR \\<computer name>\<share name>\<directory>\<batch file name>

STATUS

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

MORE INFORMATION

Listed below are examples of the program item command line, the contents of a batch file, and the result of selecting the program item.

Program Item Command Line

   \\<machine name>\<share name>\<directory>\<batch file name>

Contents of Batch File

echo off copy c:\winnt\system32\ras\modem.inf <UNC-format name addressed above> echo .. echo ..

echo    Doing a directory to confirm file copy
echo .. echo .. DIR *.inf echo ..
echo    DONE
pause

Result Output

   \\<machine name>\<share name>\<directory>\<batch file name> >echo off
        1 file(s) copied.
..
..
   Doing a directory to confirm file copy
.. .. The system cannot find the file specified. ..
   DONE
Press any key to continue . . .


Additional query words: prodnt p page w wide
Keywords : kbbug3.10 kbtool ntutil
Version : 3.1 3.5
Platform : WINDOWS


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: May 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.