Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to know if a directory exists ?
Message
From
30/10/2008 17:23:03
 
 
To
28/10/2008 13:59:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01357782
Message ID:
01358504
Views:
24
>how to know if a directory exist ?
>and how to creat it if not exist ?
You could simply try to create the directory and trap for the error
lcDir = "mypath"
TRY
   mkdir lcDir
CATCH TO loError
  ** Directory exists, no problem or
  ** Insert code for testing rights, etc
ENDTRY
Previous
Reply
Map
View

Click here to load this message in the networking platform