#!/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 $_; } }
In reply to Works on test but not in real by Win
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |