Microsoft KB Archive/122937

{| = BUG: ADIR Returns Incorrect Volume Names =
 * width="100%"|

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.