|
DIR() |
|
|
The DIR() function returns the contents of an operating system directory.
Format
DIR(pathname)
where
The DIR() function returns a dynamic array with one field per entry in the specified directory. Each field contains two items separated by value marks:
A = archive C = compressed H = hidden R = read only S = system T = temporary On other platforms, this value contains the file permissions as a decimal value.
The standard . and .. directory entries are not returned.
Applications should not assume that this structure will remain unchanged. Additional values may appear in future releases.
Example
FILES = DIR('C:\MYDIR') NUM.FILES = DCOUNT(FILES, @FM) FOR I = 1 TO NUM.FILES IF FILES<I,2> = 'F' THEN DISPLAY FILES<I,1> NEXT I
The above example lists all the files in C:\MYDIR, omitting subdirectories. |