Using FoxPro to Check for Existence of a Directory (94339)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft FoxPro for MS-DOS 2.0
- Microsoft FoxPro for MS-DOS 2.5
- Microsoft FoxPro for MS-DOS 2.5a
- Microsoft FoxPro for Windows 2.5
- Microsoft FoxPro for Windows 2.5a
This article was previously published under Q94339 SUMMARY
There are two ways to check for the existence of a directory on a
drive:
- The FILE() function can be used to check for the existence of a
file on a local drive. FILE() only works on network drives under
work groups.
NOTE: The method described below using the FILE() function does not work
when running FoxPro for Windows or FoxPro for MS-DOS under Windows 3.11.
This method can only be used when running FoxPro for MS-DOS directly
under MS-DOS versions greater than 3.0, or when running FoxPro for MS-
DOS or FoxPro for Windows under Windows NT.
-or-
- The ADIR() and ASCAN() functions can be used together to check for
the existence of a file on either a local or network drive.
REFERENCES
For 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.
Modification Type: | Major | Last Reviewed: | 12/1/2003 |
---|
Keywords: | KB94339 |
---|
|