in reply to Renaming picture in folders...

File::Wildcard is designed for this kind of job. Warning: untested

use File::Wildcard; my $wc = File::Wildcard->new( path => './//', match => qr{^(.*?Folder_\d+)/(\w+.jpg)$}, derive => [ '$1_$2' ], ); while (my $match = $wc->next) { my ($from,$to) = @$match; print "Renaming $from to $to\n"; rename $from $to; }

--

Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)