Get file info

Command group Flag affected Reversible Execute on client Platform(s)
External commands YES NO NO Windows,Linux


Get file info (path, type, creator, log-size, phy-size, creat-date, creat-time, mod-date, mod-timeReturns err-code


Note: The flag is set according to whether Omnis was able to make a call to this external command.

This command returns information about the file specified in path.

A file may occupy more physical disk space than is necessary, because disk space is usually allocated in blocks of some fixed size. This is why the logical and physical sizes can be different.

It returns an error code (See Error Codes), or zero if no error occurs.

When constructing the path to a file or folder, you can use sys(9) to insert the correct path delimiter for the current platform: \ (back-slash) on Windows, or / (forward-slash) for Unix and 64-bit macOS (: colon on 32-bit macOS). In addition, you can use sys(115) to return the full pathname of the folder containing the Omnis executable, including the terminating path separator, which might be useful to reference files in the Omnis tree.


; return the file info for the omnis executable
Calculate lFileName as con(sys(115),'omnis.exe')
Get file info (lFileName,lFileType,lFileCreator,lFileLogicalSize,lFilePhysicalSize,lFileCreationDate,lFileCreationTime,lFileModifiedDate,lFileModifiedTime) Returns lErrCode