In article <***@news.individual.net>,
Stan Brown <***@fastmail.fm> wrote:
...
Post by Stan BrownPost by Kenny McCormackPost by Stan BrownRD deletes one directory if it's empty, but I don't know of a
recursive variant since it would have to start at the bottom and not
at the top of the structure.
True. Good point.
Post by Stan BrownPost by Kenny McCormackdir /ad/s/b > foo.bat
{ edit foo.bat in your favorite editor; insert "rd " at the beginning of each line }
Run foo.bat and ignore any/all error messages.
It's a good idea to try a "solution" before you post it. If you had
done that -- as I did -- you'd have found that what I said was
correct.
So, OK. You add a step that sorts the file accordingly, to get bottom-up
order. I am not going to go into it right now, but it should be pretty
easy to do this in AWK or similar.
Or, ...
You just run the batch file over and over until nothing is deleted. (heh heh)
But, yes, your overall point that there isn't a compact (i.e., one-command)
and slick (no weirdness such as I am proposing) way to do this is valid.
I mean, if I had to do it (and I'm assuming that if I had to do it, it
would just be a one-off, not part of a repeating process - and I'm assuming
same of the OP), I'm sure I could easily get it done, but, no, there
doesn't seem to be a easy straightforward single command to do it.
Or, ...
--
Rich people pay Fox people to convince middle class people to blame poor people.
(John Fugelsang)