#x tests to see if a file is open and can be moved use File::Copy; $dir = "C:\\Documents and Settings\\philc\\Desktop\\01_ testing\\Copy"; $file = "test.pdf"; $destination = "C:\\Documents and Settings\\philc\\Desktop\\01_ testing\\Copy\\Xtests2"; #test all file tests -e, -r, -w, -o,-l.-p,-s,-t, if(-e $file){ copy($file,$destination); print "okfine\n"; }else{ print "doh!\n"; }