• Welcome to OS2World OLD-STATIC-BACKUP Forum.
 

News:

This is an old OS2World backup forum for reference only. IT IS READ ONLY!!!

If you need help with OS/2 - eComStation visit http://www.os2world.com/forum

Main Menu

Get Create, Access and Write time/date of file.

Started by jep, 2008.04.10, 16:08:45

Previous topic - Next topic

jep

Marked as: Easy

New function as documented in Object Rexx.

SysGetFileDateTime

Syntax:    result = SysGetFileDateTime( filename [,timesel] )

Params:    filename - name of the file to query
            timesel  - What filetime to query: CREATE/ACCESS/WRITE

say "File creation time:" SysGetFileDateTime("MyFile.Log", "C")
say "File last access time:" SysGetFileDateTime("MyFile.Log", "A")
say "File last update time:" SysGetFileDateTime("MyFile.Log", "W")

Return -1 to indicate failure or the date and time if successful.