Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make sure directory exists
Message
From
16/07/1998 10:18:39
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00117916
Message ID:
00118096
Views:
16
>My experience is that DIRECTORY() is not reliable in all circumstances. Instead:
>
>
>DIMENSION aTest[1,5]
>IF ADIR(aTest,'C:\Some\Directory','D') > 0
> * Dir exists, but may not be writable at this point based on media/user permissions
>ELSE
> * Dir doesn't exist
>ENDIF
>
>
>>Use the DIRECTORY() function.
>>-myron kirby-
>>=============================
>>>How could I check to see if a given directory exist before attempting to create a file there at runtime? (the directory name is stored in a configuration table and it will probably exist most of the times, but...).
>>>
>>>Thanx in advance.

Hello Ed!

I agree with you. File() and Directory() works correctly on local drives and Microsoft based networks. (NT) (There is MS KB article about it)
MS suggest to use Adir() for network.

BB
Previous
Reply
Map
View

Click here to load this message in the networking platform