in reply to find instances of a file without knowing specific path

Yup, see File::Find::Rule

Update: Code:

use File::Find::Rule qw( ); use File::Basename qw( dirname ); use File::Spec::Functions qw( catfile ); my $rule = File::Find::Rule ->file ->name('abc.lnk') # Wildcards allowed ->start('C:\\Documents and Settings'); while (defined(my $src = $rule->match()) { my $dst = catfile(dirname($match), 'def.lnk'); if (-e $dst) { warn("Unable to rename \"$src\": " . "Destination \"$dst\" already exists\n"); next; } if (!rename($src, $dst)) { warn("Unable to rename \"$src\": $!\n"); next; } print("Renamed \"$src\" to \"$dst\"\n") if $verbose; }