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)
In reply to Re: Renaming picture in folders...
by rinceWind
in thread Renaming picture in folders...
by A200560
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |