The only change you might have to do for windows (and most of the Perl functions will let you slide on this) is that in Windows the delimiter for directories is the backslash. To search the entire hard drive, the OP might also want to look into File::Find.
-----Original Message----- From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Sun 10/23/2005 11:19 PM To: Perl Beginners Cc: Subject: Re: rename and move multiple files <snip> UNTESTED (sorry I don't use Windows): my $dir = '/renoutput'; mkdir $dir or die "mkdir '$dir' $!"; my $count = 1; for my $file ( glob '/*/output.txt' ) { rename $file, "$dir/output" . $count++ . '.txt' or die "Cannot rename '$file' to '$dir/output$count.txt' $!"; }