I have posted below a bit of code that is part of a pdf creation lsp that automatically makes a pdf with the dwgname and a rev attribute from the titleblock as its filename. I have got it working by adding the delay befopre the renaming happens to allow for the pdf to be created but it is a bit hit and miss depending on the speed of the machine it is run on. Any suggestions on a better way, I have tried to wait for the file to be recognised using various doslib commands but I think the file is there as soon as the pdfcreator starts to make it, but it is still open so the lisp just crashes... Sorry if this is a bit confusing (and long) for a friday afternoon but i think ive run out of ideas.. (defun c:pdf-rev ( / newfile tabname dname dname1 dpref pdfoldname pdfnewname ) (setq oldtile (getvar "tilemode")) (setvar "tilemode" 0) (command "plot" "y" "" "PDFcreator" "A3" "m" "l" "n" "e" "1:2" "c" "y" "a3.ctb" "y" "n" "n" "n" "n" "n" "y") (dos_waitcursor T) (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")) (command "delay" 8000) (dos_delete pdfnewname) (dos_rename pfdoldname pdfnewname) (dos_waitcursor)