Win has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; use warnings; use File::Find::Rule; # find all the subdirectories of a given directory my $directory = "G:/X/"; my $directory_label = "G:/X"; print "Start\n\n"; print "The following directories have files in with names of more than + 250 characters:\n\n"; my @subdirs = File::Find::Rule->directory->in( $directory_label ); foreach (@subdirs){ print "#"; my $directory_current = $_; my $rule = File::Find::Rule->new; $rule->file; $rule->name( '*.*' ); $rule->name( qr/^.{250,1000}$/); my @files = $rule->in( @subdirs ); foreach(@files){ print $_; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Works on test but not in real
by marto (Cardinal) on Aug 04, 2009 at 13:31 UTC | |
| |
|
Re: Works on test but not in real
by ig (Vicar) on Aug 05, 2009 at 02:06 UTC |