Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to determine if a folder exists?
Message
De
15/02/2004 21:49:10
Mike Sue-Ping
Cambridge, Ontario, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00877389
Message ID:
00877536
Vues:
8
Hi George.

I settled for VFP's native DIRECTORY() function. Any reason why you think I should not trust it and use the FileSystemObject instead?

Regards,

Mike


>>I'm using VFP8. How can I determine if a folder already exists? I can't seem to find a built in function.
>>
>>TIA
>>
>Mike,
>
>Since you're using VFP 8 which is supported on Win2K and above, I'd suggest
oFSO = CREATEOBJECT('Scripting.FileSystemObject')
>IF oFSO.FolderExists("c:\foldername") THEN
>  * Code here
>ENDIF
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform