News:

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

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.