in reply to Recursively blowing away directories of a certain name
use File::Find qw(find); use File::Path qw(rmtree); @ARGV = qw(.) unless @ARGV; my @goners; find sub { return unless -d; return unless $_ eq "_vti_cnf"; $File::Find::prune = 1; # don't descend, gone later anyway push @goners, $File::Find::name; }, @ARGV; rmtree \@goners, 1, 1; # trace, and ignore undeleteables
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: •Re: Recursively blowing away directories of a certain name
by aarestad (Sexton) on Nov 26, 2003 at 17:46 UTC |