Equinox Online Help - Language Reference - A to Z

Home

FileDetails

Applies to
SyntaxFileDetails [NameItem, TypeItem, DateItem, TimeItem, SizeItem, PathItem]
Action[Statement] Retrieves file details.
ScopeUsable anywhere
Notes

This statement retrieves details of the last file found by FileSearch or FileSearchNext. All of the destination items are optional.

TypeItem will contain a string describing the file type (see below)

NameItem will contain the file name

DateItem will contain the date of last read-write access

TimeItem will contain the time of last read-write access

SizeItem will contain the file size in bytes

PathItem will contain the directory path to the file

The TypeItem parameter will contain one or more of the following letters, representing MSDOS file attributes:

  • N Normal
  • R ReadOnly
  • H Hidden
  • S System
  • V VolumeId
  • D Directory
  • A Archive

The system workarea SysError is set to a non-zero value if an error occurs, otherwise zero.

CategoryFile Management
See Also ChooseFile, FileDelete, FileDetails, FileExists, FileHandle, FilePath, FileRename, FileSearch, FileSearchNext, MakeDirectory, RemoveDirectory
Example

Comprehensive examples of the use of FileDetails are found in the FileSearch and FileSearchNext examples.

This example prints a file's size.

long lSize

FileSearch "test.dat"

if syserror then Exit Method

FileDetails, , , , lSize
Print lSize

This example prints all the file's details.

string FName, FPath, FType
date FDate, FTime
long FSize

FileSearch "MYFILE2"

if syserror then Exit Method

FileDetails FName, FType, FDate, FTime, FSize, FPath
Print FName, FType, FDate, FTime, FSize, FPath