#!/usr/local/bin/perl #Version 0.1 if ($#ARGV<1) { print "Ändra från: "; chomp($ARGV[0] = ); print "Ändra till: "; chomp($ARGV[1] = ); } $from = $ARGV[0]; $to = $ARGV[1]; print "[$from] [$to]\n"; opendir DIR, '.' or die $!; while($file=readdir DIR) { next unless $file =~ /$from/; $resfile = $file; eval qq(\$resfile =~ s/$from/$to/); rename $file, $resfile or warn "mvre: coudn't move $file to $resfile: $!\n"; } closedir DIR;