#!/bin/perl use warnings; use strict; use File::Find; use File::Copy; my $path = $ARGV[0]; my $from = $ARGV[1]; my $to = $ARGV[2]; die "You must supply a full directory path" unless (-e $path && -d $path); find(\&renamedir, "$path"); sub renamedir { next if -f $_; next if /^\./; my $new_name = $_; $new_name =~ s/$from/$to/g; chdir($File::Find::dir); move($_, $new_name) or die $!; } #### C:\>Replace.pl "C:/Temp/" John Matt