How to delete a directory
DraagonStorm
Posts: 748
I've tried a lot of different ways... Some has shown no error, but still the directory is not being deleted... Help!
What I want to do is first verify the directory exists, and if it does, delete it.
Comments
You've tried DzDir.rmDir() ?
Yes... Maybe I'm doing it wrong.. Can you post some sample code that you know works?
This works - comment out the rmdir line on first run so you can see the folders created, then try it again and it will remove the expendable folder.
Richard, Does the folder have to be empty to remove it?
I would expect so, yes. It's like the DOS command, which as I recall worked only on empty folders (unlike killtree, or whatever it was, or the Windows delete key in Explorer)