On Tuesday 16 November 2004 09:26 pm, Alan Dayley wrote:
this is crude but it works:
#!/usr/bin/env perl
my @fromfiles = <*.JPG>;
my @tofiles = <*.JPG>;
my $n = 1;
my $n3;
foreach (@tofiles) {
/.*_(.*)\.JPG/;
$n3 = sprintf "%3.3d", ($n);
s/$+/$n3/;
$n++;
}
for(my $n=0; $n<$#fromfiles; $n++) {
system "mv $fromfiles[$n] $tofiles[$n]\n";
}
--
Registered Linux User: 275424
Today's Fortune: Life's the same, except for the shoes.
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss