#!/usr/bin/perl # copy a file $in = "postcodes"; $out = "pc.bak"; open (IN,$in); open (OUT,">$out"); print OUT $buffer while (read (IN,$buffer,65536)); #### #!usr/bin/perl use strict; use File::Find; use File::Copy; my @location=("C:\\Documents and Settings\\smanicka\\Desktop\\JAVA","C:\\Documents and Settings\\smanicka\\Desktop\\excel files-new"); my $new_location="C:\\moved_files"; foreach my $location(@location){ find(\&force_move,$location); } sub force_move(){ my $file=$_; print "\n $file"; copy($file,$new_location) or warn "$!" ; } print "I am done!!!!"; sleep(2);