;| RESAVE.LSP (c) 1998 Tee Square Graphics Creates and runs RESAVE.SCR script file to open and resave all drawing files in a user-specified directory (folder) in the current (R14) format. All drawings will be zoomed to extents. NOTE: requires DOSLib.arx to be loaded prior to invoking RESAVE command. |; (defun C:RESAVE (/ path files outf) (setq path (getstring "\nPath: ")) (if (not (or (wcmatch path "*/")(wcmatch path "*\\"))) (setq path (strcat path "/"))) (setq files (acad_strlsort (dos_dir (strcat path "*.dwg"))) outf (open "resave.scr" "w")) (foreach x files (write-line (strcat "_.open \"" path x "\" _.zoom _e _.qsave") outf)) (write-line "_.quit" outf) (close outf) (command "_.qsave" "_.script" "resave") (princ) )