PRB: ADIR() Function Returns Incomplete Information

Last reviewed: April 17, 1995
Article ID: Q98360
The information in this article applies to:
  • Microsoft FoxPro for MS-DOS, versions 2.5, 2.5a, and 2.5b

SYMPTOMS

The ADIR() function returns nothing for the volume label of a selected disk.

CAUSE

The volume label for the particular drive consists of a text string that is more than 8 characters in length.

RESOLUTION

Make sure the volume labels on your disk drives contain 8 characters or fewer.

MORE INFORMATION

If you use the following code

   SET TALK OFF
   ? VOLUME('C')                   && Print volume label of drive C

   PROCEDURE volume
     PARAMETER drive
     string = drive + ':'
     DIMENSION temparray(1)
     =ADIR(temparray,(string),'V')
     RETURN temparray(1)

FoxPro 2.5 or 2.5a for MS-DOS will return the following:
  • If the volume label for drive C is ANYTEXT, ADIR() returns ANYTEXT.
  • If the volume label for drive C is ANY_TEXT1 (greater than 8 characters), ADIR() returns nothing.


Additional reference words: FoxDos 2.50 2.50a 2.50b DIRECTORY COMMANDS
ARRAY
FUNCTION
KBCategory: kbprg kbprb
KBSubcategory:


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: April 17, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.