Hello, I'm sure someone must have a little routine for removing blanks from the drawing name. I have some software that uses the drawing name in a DOS Batch file Which chokes if there is blanks Its been a while since i did any lisping here is my attempt (defun dn () (setq dn (getvar "dwgname") dnl (strlen dn) x dnl ) (while (> 0 x) (if (= (substr dn x) " ") (progn (setq a (substr dn 1 (- x 1))) (setq b (substr dn (+1 x) (strlen dnl))) (setq dn (strcat a "_" b)) ) ) (setq x (- x 1)) ) (princ dn) ) any suggestions appreciated. obviously the above doesnt work thanks in advance jm