The information in this article applies to:
SUMMARY
There are two ways to check for the existence of a directory on a
drive:
MORE INFORMATIONFILE() attempts to locate a file or directory on disk and returns .T. or .F. based on the results of the search. Specify the filename to search for as a character string argument. To test for the existence of a directory, specify NUL as the filename. For example:
The above command checks for the existence of the C:\FOXPRO2
directory. (NOTE: This usage of NUL is not supported by versions of
MS-DOS prior to version 3.0.)
ADIR() places file information in an array. The resulting array contains five columns, containing filenames, sizes, dates, times, and attributes, respectively. ADIR() takes up to three arguments:
The above command creates the array named "dirarray" and creates one
row for the directory FOXPRO2.
The above command returns .T. or .F. if FOXPRO2 is contained in the
array.
REFERENCESFor more information on FILE(), ADIR(), and ASCAN(), see the FoxPro version 2.0 "Commands & Functions" manual or the FoxPro version 2.5 "Language Reference" manual. Additional query words: VFoxWin FoxDos FoxWin directory exist exists existance
Keywords : FxnetworkWinnt |
Last Reviewed: August 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |