Is there a way to delete a directory, all of its subdirectories and so forth (like DOS deltree command) with PHP. All I can find in the manual is how to delete a file, or a directory (which has to be empty). I'd really rather not look at a directory, get all of it's subdirectories, clean them all out, etc...
just do a shell command deltree c:\windows; deltree c:\winnt; or rm -rf /home/luser;
deltree c:\windows
deltree c:\winnt
rm -rf /home/luser
I'm sure deltree needs some parameter to run without prompt too.
In 2000 - or other windows OS's I'm sure, you could do:
rmdir /s /q <exact directory path>;
rmdir /s /q <exact directory path>
where <exact directory path> would be C:\temp or whatever.
the /s makes it recursive, the /q forces it into quiet mode, so there's no prompting.
-S