Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Can File:Find be used to find empty dirs?

by Kenosis (Priest)
on Nov 20, 2013 at 06:21 UTC ( #1063449=note: print w/ replies, xml ) Need Help??


in reply to Can File:Find be used to find empty dirs?

Consider using File::Find::Rule::DirectoryEmpty which inherits File::Find::Rule to recursively find empty directories:

use strict; use warnings; use File::Find::Rule::DirectoryEmpty; my $dir = 'C:/Temp/'; my @emptydirs = File::Find::Rule->directoryempty->in($dir); print "$_\n" for @emptydirs;

Hope this helps!


Comment on Re: Can File:Find be used to find empty dirs?
Download Code
Replies are listed 'Best First'.
Re^2: Can File:Find be used to find empty dirs?
by PerlPlay (Novice) on Nov 20, 2013 at 13:29 UTC

    Thanks for the code looks simple enough, I'll just have to convince IT to install that module. Thanks to reply above this one too.

      You're most welcome, PerlPlay!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1063449]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2016-02-10 00:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (329 votes), past polls