I am trying to get a lisp routine to pause until a pdf is created before renaming it as part of a plotting routine. Im probably miles out but any help would be appriciated. end portion of routine listed below. (setq testfile (dos_filep "c:\My Documents\plotfiles\tempplot.pdf")) (while (= "nil" testfile) (command "delay" 2000) (setq dop (dos_filep "c:\my documents\plotfiles\tempplot.pdf")) ) (dos_delete pdfnewname) (dos_rename pfdoldname pdfnewname) (setvar "tilemode" oldtile) (princ) ) Thanks Spence