Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does the directory exist?
Message
From
23/09/1999 12:13:54
Steven Herbin
SNH Computing Corporation
Swan Lake, New York, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00267693
Message ID:
00268045
Views:
23
>>I'm having touble figuring out how to determine if a directory exists. I've tried FILE(fullpath) and FILE(fullpath\.) etc...
>>
>>Any easy way?
>>
>>TIA
>
>adir(laResults, "MyDir.*", "D") will put the results into array laResults. The return value is numeric equal to the number of matches to the mask.


There could be an easier way from the good old days of DOS (remember then?):

if file("c:\xxxx\nul") && where xxxx is your directory name
messagebox("Exists")
else
messagebox("N/G")
endif

You could also test for "prn" or some other things but the above works.
Steven Herbin
SNH Computing Corporation
Swan Lake, NY
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform