Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Make sure directory exists
Message
De
16/07/1998 06:49:25
 
 
À
15/07/1998 19:47:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00117916
Message ID:
00118031
Vues:
28
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.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform