The bottom 5 lines of this lsp seem to be wrong, Can someone point out what the code should be, t is supposed to wait for a pdf file to be created befor renaming it. I can get it to work by delaying by 10 seconds but really would like a shorter delay and to keep checking until file is created. Any suggestions. (defun c:pdf-rev ( / newfile) (command "plot" "y" "" "PDFcreator" "A3" "m" "l" "n" "e" "1:2" "c" "y" "a3.ctb" "y" "n" "n" "n" "n" "n" "y") (blocksearch) (setq tabname (getvar "ctab")) (setq dname (getvar "dwgname")) (setq dname1 (substr dname 1 (- (strlen dname) 4))) (setq dpref (strcat "C:/My Documents/PLOTFILES/")) (setq pfdoldname (strcat dpref dname1 " " tabname " (1)" ".pdf")) (setq pdfnewname (strcat dpref dname1 "_" newfile ".pdf")) (While (not (findfile pfdoldname)) (command "DELAY" 100) ) (dos_rename pfdoldname pdfnewname) ) thanks Spencer