# # # moves the ATM files from the c: to c:\atm and renames them with the # current date. # # use File::Copy; @files = ("ATMCAF00", "ATMCAF01", "ATMCAF12", "ATMCMF01", "ATMCMF12"); $old = "c:/"; $new = "K:/ATM/"; print "Enter the month and day (ex:0605)\n"; $date = ; chomp($date); sub moving { print "Moving $_ to the K:/ATM \n"; move("$old$_","$new$_$date"); print "$_ has been moved to the K:/ATM\n"; print "---------------------------------------------\n"; } foreach (@files) { &moving; } print "All the ATM files have been renamed and move to the ATM folder\n"; $wait = ; #### print "Enter the month and day (ex:0605)\n"; $date = ; chomp($date); move(c:/atmcaf00,K:/atm/atmcaf00$date); move(c:/atmcaf00,K:/atm/atmcaf01$date); move(c:/atmcaf00,K:/atm/atmcaf12$date); move(c:/atmcaf00,K:/atm/atmcmf01$date); move(c:/atmcaf00,K:/atm/atmcmf12$date); print "All the ATM files have been renamed and move to the ATM folder\n"; $wait = ;