Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating folders as needed
Message
 
À
20/03/2005 23:02:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00997745
Message ID:
00997746
Vues:
13
This message has been marked as the solution to the initial question of the thread.
>Thought I knew how to do this until I actually tried :-)
>
>Seeking recommendations on the most elegant way to test if a specific folder exists and to create it if it does not.
>
>TIA
lcFolder = 'c:\myNewFolder'
if not directory(lcFolder)
   try
      MD (lcFolder)
   catch
      ? "Invalid folder name, insufficient rights, or some other problem"
   endtry
endif
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform