#!/bin/sh #! -*- perl -*- eval 'exec $PERLLOCATION/bin/perl -x $0 ${1+"$@"} ;' if 0; use File::Find; # Run this program and give it the arg elementTake57a_inertia $finalBasename = $ARGV[0]; &File::Find::find( sub { my($basename, $frame, $ext) = $_ =~ /([^\/]*) # basename - non-slash chars \. # literal dot (\d+) # frame number - digits \.(\w+)$/x; # extention - ends w/ letters+numbers my $dir = $File::Find::dir; if ($basename eq $finalBasename) { rename($File::Find::name, ($dir . '/final.' . $frame . '.' . $ext)); } }, ".");