Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why no Directory() like File()?
Message
From
10/12/1999 10:13:24
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
10/12/1999 10:07:43
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvania, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00301679
Message ID:
00301687
Views:
28
>There is a MkDir (MD) command, which works great if the directory doesn't exist. Rather than return false if it does, it generates an error. Is there a command that will let me first check if the directory exists before attempting to create it (and generating the error?)
>
>Or will I have to trap the error and resume? (which really offends my sense of code elegance)
>
>On a similar note, how does one check a table for exclusive access before trying to open it exclusively? (i have a routine which tries exclusive and (if already used) the error trap returns to the next line, which checks if the table is open, and if not, opens shared. I hate it, but it works)


There is directory() and adir() (with "D" option).
Tey flock().
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform