Sweeeeeeettt. :kewl: Very nice.
Thanks.
(foreach file '("acad" "civil" "land" "custom")
I would add "custom" to cover any users cui.s
Completely forgot about Custom. Updated above and added mns and mnl.
Actually, this might be more versatile. It will just copy everything that matches CUI, MNU, MNL, MNS, CUIX, PGP. Will also ignore any of the 'bak' menu files.
(defun c:BackUp (/ str)
;; Alan J. Thompson, 04.28.10
(vl-mkdir "c:\\BackUp")
(setq str "")
(foreach file (vl-directory-files (vl-filename-directory (findfile "acad.pgp")))
(and (wcmatch (strcase file) "*.CUI*,*.MNU,*.MNL,*.MNS,*.PGP")
(not (wcmatch (strcase file) "*BAK*"))
(setq str (strcat str file "\n"))
(vl-file-copy (findfile file) (strcat "c:\\BackUp\\" file))
)
)
(or (eq "" str) (alert (strcat "Files backed up to c:\\BackUp\n\n" str)))
(princ)
)