BUG: ADIR() Returns Incorrect Volume Names

Last reviewed: May 27, 1997
Article ID: Q122937
The information in this article applies to:
  • Microsoft FoxPro for MS-DOS, version 2.6a

SYMPTOMS

The ADIR() function may return a blank or incorrect volume name in FoxPro for MS-DOS for a network or local drive if the volume label contains more than eight characters.

RESOLUTION

Use the Library Construction Kit (LCK) to create a .PLB that obtains the volume label.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

To reproduce the problem, create and run a program containing the following lines of code:

   * show drives between C: and Z: that exist, get their volume name:
   m.startdrv = ASC("C")
   m.enddrv   = ASC("Z")
   m.olddefa = SYS(5)
   FOR i = m.startdrv TO m.enddrv
      m.testfile = CHR(i) + ":\NUL"
      string = CHR(i) + ':'
      DIMENSION temparray(1)
      IF FILE(m.testfile)
         SET DEFAULT TO CHR(i)
         = adir(temparray,'*.*','v')
         WAIT WINDOW "Drive: " + chr(i) + ;
            ": exists. Vol name is: "+temparray(1)
      ENDIF
   ENDFOR

FoxPro returns blank or incorrect volume names for network or local drives when the volume label contains more than eight characters.

REFERENCES

For more information about related problems with ADIR(), please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q98357
   TITLE     : FIX: ADIR() Doesn't Return Volume Label in FoxPro 2.5


 

	
	


Keywords : buglist2.60a FoxDos FxprgGeneral
Version : 2.6a
Platform : MS-DOS
Issue type : kbbug


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