Does anyone know why this function returns nil on some files? I've checked that the files are not open but it still returns nil?
I've even tried using the file system object like so but it throws an exception
(defun rjp-getfileobj (file / sfso out)
(if (and (setq sfso (vlax-create-object "Scripting.FileSystemObject"))
(setq out (vl-catch-all-apply 'vlax-invoke (list sfso 'getfile file)))
(not (vl-catch-all-error-p out))
)
out
)
)
(defun getmod (file) (vlax-get file 'datelastmodified))
(setq files (mapcar 'getmod (vl-remove 'nil (mapcar 'rjp-getfileobj files))))