vl-file-systime

AutoCad AutoLISP Functions

 
vl-file-systime
 
 
 

Returns last modification time of the specified file

(vl-file-systime filename)

Arguments

filename

A string containing the name of the file to be checked.

Return Values

A list containing the modification date and time; otherwise nil, if the file is not found.

The list returned contains the following elements:

  • year
  • month
  • day of week
  • day of month
  • hours
  • minutes
  • seconds

Note that Monday is day 1 of day of week, Tuesday is day 2, and so on.

Examples

_$ (vl-file-systime 
      "c:/program files/<AutoCAD installation
directory>/sample/visuallisp/yinyang.lsp")
    
(1998 4 3 8 10 6 52)

The returned value shows that the file was last modified in 1998, in the 4th month of the year (April), the 3rd day of the week (Wednesday), on the 8th day of the month, at 10:6:52.