john dlugosz dhcgnd702sneakemailcom seek wisdom perl monks wwwperlmonksorg short answer httpperldocperlorgfunctionsxhtml gives file age john tara taralishatyahoocom perl 6 wrote im trying perl script pc perl5 installed bat file open cmd prompt interact user copy files one location directories anyone know dir files directory array sort date return ones within past week far code returns files files dir chomp files print files n files qq exit 0 files xml print recently added xml files files n printf copylog recently added xml files files n type xml elsif files tc print copying expected result file n printf copylog copying expected result file n type tc else print invalid file type files doesnt exist current directoryn printf copylog invalid file type files doesnt exist current directoryn type bad fri 08 aug 2008 024440 0500 windows xp copyfile