INTERACT FORUM
More => Old Versions => Media Center 12 (Development Ended) => Topic started by: WolfWalker on March 21, 2008, 01:26:02 pm
-
good 0 byte folder finder and delete them
-
Try this. I've used it, and it seems to work pretty well.
http://www.jonasjohn.de/lab/red.htm
-
One thing I don't like about that, is that I can't seem to find a way to tell it to ignore an entire folder that may have empty folders inside of it. So if I have a folder that has 5 empty folders in it, and for whatever reason those are important folders (even if they are empty), I have to tell it to always skip each of those 5 folders, rather than just be able to tell it to ignore the parent folder and all subfolders.
-
DIR /AD/B/S | SORT /R > EMPTIES.BAT
The file EMPTIES.BAT now contains a list of all folders on your hard drive in reverse order. Use Word or another editor to put the filenames in quotes and add the prefix RD (with a space after RD) to every line in the file. In Word, you can do this easily by using Find and Replace to search for ^p (which represents the paragraph mark) and replace it with "^pRD " (quote, p, R, D, space quote), then hand-correct the first and last lines of the file if necessary. Save the modified EMPTIES .BAT file and exit your editor. Then simply launch the batch file. It will attempt the RD (remove directory) command on each folder, but the command will fail for any folder that is not empty.
It runs backwards so the nested sub-directories are removed first.
This will remove all empty folders (not as Doof was requesting above).
-
I use a program called "EmptyFolderNuker", but I don't have URL handy...
It does have the ability to toggle "Considering folders with only empty subfolders as empty"....
brad