(defun GetFileList (dirName / files lst) (setq dirName (path-addBackSlash dirName) files (mapcar '(lambda (x) (strcat dirName x)) (vl-directory-files dirName "*.dwg" 1)) ) (mapcar '(lambda (x) (setq lst (append lst (GetFileList (strcat dirName x))))) (vl-remove-if '(lambda (x) (member x '("." ".."))) (vl-directory-files dirName nil -1) ) ) (append files lst) ) (defun path-addBackSlash (path) (if (not (member (substr path (strlen path)) '("\\" "/"))) (strcat path "\\") path ) )
|