Information générale
Catégorie:
Codage, syntaxe et commandes
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement