Jump to content

vl-file-systime only returning nil


frostrap

Recommended Posts

I'm stumped.

 

The following code returns filenames, but only returns nil for the modification date of each file.

 

This code is just the building block for a simple program that will purge .bak files from a specified folder after they've been in there for some given period of time.

 

Any ideas why I'm only getting nils returned to me?

 

(defun Sbu(/ thefile thelist datemodified)
 (vl-load-com)
 (setq thelist (vl-directory-files "c:\\test\\" "*.*" 1))
 (foreach thefile thelist
   (setq datemodified (vl-file-systime thefile))
   (print thefile)
   (print datemodified)
 );foreach
 (princ)
);defun

 

Thanks,

 

Joe

Link to comment
Share on other sites

(defun Sbu (/ thefile thelist datemodified)

(vl-load-com)

(setq directory "c:\\test\\")

(setq thelist (vl-directory-files directory "*.*" 1))

(foreach thefile thelist

(setq datemodified (vl-file-systime (strcat directory thefile)))

(print thefile)

(print datemodified)

) ;_ end_foreach

(princ)

) ;_ end_defun

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...