I'm trying to clear the recent files opened using the routine below without any luck:
Using Windows 10 BricsCAD V20 en_US.
Any suggestions?
(defun c:CleanRecentFiles (/ root m)
(vl-load-com)
(setq root (strcat "HKEY_CURRENT_USER\\" (VLAX-MACHINE-PRODUCT-KEY) "\\Recent Paths\\")
m 0)
(foreach item ((lambda (/ n values val)
(setq n 0)
(while (setq val (vl-registry-read root (strcat "File" (itoa (setq n (1+ n))))))
(setq values (cons val values))
(vl-registry-delete root (strcat "File" (itoa n))))
(reverse values)))
(if (wcmatch (strcase item) "*DWG")
(vl-registry-write root (strcat "File" (itoa (setq m (1+ m)))) item)))
(princ (strcat "\n" (itoa m) " DWG files remain in recent drawings list"))
(princ))