#!/usr/bin/perl use File::Copy; @files = ("ATMCAF00", "ATMCAF01", "ATMCAF12", "ATMCMF01", "ATMCMF12"); $old = "."; $new = "/ATM/"; print "Enter the month and day (ex:0605)\n"; $date = ; chomp($date); foreach my $file (@files) { print "Moving $old$file to $new$file$date \n"; if(move("$old$file","$new$file$date")) { print "$file has been moved\n"; } else { print "Error moving $old$file <$!>\n"; } print "---------------------------------------------\n"; } print "All the ATM files have been renamed and move to the ATM folder\n"; $wait = ;