>From PC magazine on a simple way to do it through the command line.
http://findarticles.com/p/articles/mi_zdpcm/is_200302/ai_ziff35243

> I'm looking for a program that can delete any folders that are empty or
> that contain only empty subfolders. Can you help?
> 
> M. V. Weir
> 
> You don't need a program; you can do this at the command prompt. Open a
> command prompt window and navigate to the root folder of the drive in
> question. Enter this command:
> 
> 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.
> 
> How does it work? For the DIR command, the switch /AD means select
> files whose attributes include the Directory attribute (in other words,
> folders). The /B switch means give a "bare" listingĀ—just the
> filenameĀ—and /S means look in subfolders, too (which, incidentally,
> modifies /B, so it shows the full pathname). The output is piped (|) as
> input to the SORT command. Not surprisingly, the switch /R means sort in
> reverse. Finally, the output of SORT is redirected (>) into the file
> EMPTIES.BAT. Because we're sorting in reverse, every folder's
> subfolders precede it in the list. If they are empty, then by the time
> the parent folder is processed, it too will be empty. You'd be
> surprised at what you can do with simple commands! 

Might want to test it first. ;)


-- 
ob_kook

SB2 --> Axiom passive pre --> Portal Paladin monoblocks --> Dynaudio
Contour 1.3 MKII
------------------------------------------------------------------------
ob_kook's Profile: http://forums.slimdevices.com/member.php?userid=1383
View this thread: http://forums.slimdevices.com/showthread.php?t=39488

_______________________________________________
ripping mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/ripping

Reply via email to