WARNING! Test this first with sample files. I'm just typing in what I'd start with. I have not tried it to verify I got it all accurate! Put the script in the same directory where your files exist, and run it from that directory.
Code:
#!/bin/perl
while (`ls`) {
chomp;
$oldfile = $_;
if ($oldfile =~ /(.*)(\d{4})(.*)/) {
$newnumber = $2 + 6430;
$newfile = "$1$newnumber$3";
print "MOVING $oldfile to $newfile\n";
# `mv $oldfile $newfile`;
}
}
You can see I commented-out the actual mv command. Run it that way for testing to make sure it does what you want (and that I didn't screw up my example!) This example assumes it can identify the files you want to rename because they contain exactly four digits one after the other in their filename. After testing, un-comment the mv command and go for it.
There's probably an easier way. I'm just so used to PERL, that I naturally grab that for problems like this. Just because I'm comfortable with it.