This script can be used to clean up a directory tree irrespective of whether the directory tree contains
non-empty directories. As long as the user has permission to remove the files, this will work.
There is no files, thor cleaning a non-empty directory tree in python os module. os.removedirs() cannot be used to clean directories with non-empty sub-directories. I work on windows and many times in the week, need to copy and delete a big file system from the network to my machine.
If I perform deletion using Windows Explorer, it takes a long time and also pops up unnecessary dialogs. The python script did it about 60% faster than explorer and about 10% faster than MKS tool-kit's 'rm -rf' command.
Top 4 Download periodically updates information of Clean up a directory tree 1.0 script from the developer, but some information may be slightly out-of-date.
Our script download links are directly from our mirrors or publisher's website. Clean up a directory tree 1.0 torrent files or shared files from free file sharing and free upload services, including Rapidshare, MegaUpload, YouSendIt, MailBigFile, DropSend, HellShare, HotFile, FileServe, MediaMax, zUpload, MyOtherDrive, SendSpace, DepositFiles, Letitbit, LeapFile, DivShare or MediaFire, are not allowed!