Determines a file’s time


      FileTime([<cFileMap>, [<nFileAttr>]]) --> <cFileClockTime>


<cFileMap> : Designates the file name, including the path and drive designation.

<nFileAttr> : Designates the file attribute explained in the table below. The default value is 0.

() : If the function is called without parameters, it returns the file time from the current FileSeek() buffer.


<cFileClockTime> : the clock time for the <cFileMap>; the clock time from the FileSeek() buffer (when called without parameters), or a null string.


Implement FileTime() alone or in conjunction with FileSeek(). If the function is called with the <cFileMap> parameter, it returns the time of the first entry found. If no matching entry is available, a null string is returned.

When called without parameters, FileTime() returns the clock time of the last file found with FileSeek(). You can also determine the clock time of file groups (wildcards) when the function is used in conjunction with FileSeek().

You can designate the attribute for the desired file in numeric form:

          Coding the File Attribute
          Value   Symb. constants     Assigned attribute
          0       FA_NORMAL
          1       FA_READONLY         READ ONLY (Read-only)
          2       FA_HIDDEN           HIDDEN (Hidden files)
          4       FA_SYSTEM           SYSTEM (System files)
          16      FA_DIRECTORY        (Subdirectory)
          32      FA_ARCHIVE          ARCHIVE (Changes since last backup)

Only the SYSTEM, HIDDEN, VOLUME, or DIR attributes must be specified for an entry to be found. If multiple attributes are implemented simultaneously, the table values are added accordingly. Of course, not all combinations are useful.


      .  The clock time of a particular file:

         ? FileTime("C:\TEXT\TEXT.TXT")      // File clock time or ""

      .  The clock time of an ARCHIVE/HIDDEN file:

         ? FileTime("C:\HIDE.TXT", 34")      // File clock time or ""

      .  Used in conjunction with FileSeek():

         cFile  :=  FileSeek(C:\TEXT.TXT")
         DO WHILE .NOT. EMPTY(cFile)
            ? cFile, FileTime()              // File name and clock time
            cFile  := FileSeek()             // Search for next entry


FileSeek(), FileAttr(), FileDate(), FileSize()


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s