Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Making directory
Message
De
04/01/2000 12:05:11
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvanie, États-Unis
 
 
À
04/01/2000 11:49:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00312471
Message ID:
00312492
Vues:
12
>MKDIR "C:\DATABASE"
>To remove a directory (if applicable) use the RMDIR command:
>RMDIR "C:\DATABASE"

RMDir only works on an empty directory. To remove the files:
Delete File ("*.*")

Then create a routine to delete the files, remove all the subdirectories, then remove the folder.

then DON'T do this:
DeleteTree ("C:\junk\..")

Which my extremely efficient recursive directory remover was happy to do...

(in case you're slow with the humor here, the .. moved to the parent directory, which was the root of my hard drive! The routine crashed when it couldn't delete in-use windows system files, but that was after it killed win.com and several other fairly important c:\ directories)

The moral of this story: be careful letting your program delete folders.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform