Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does the directory exist?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00267693
Message ID:
00269293
Views:
21
>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?

There are two easy approaches that I use; either ADIR(aRandomArray,"directory name",'D') > 0 and "D" $ aRandomArray[1,5] (some problems with name formation in network environments) or use FCREATE() to try creating a file in the directory - it will fail if the directory doesn't exist, but also will fail if the user doesn't have the necessary privileges to write/create in the dirctory.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform