The following example uses dirExt( ) to store the file information for all the files in the root directory of the current drive to the array aFiles. The file name and access date is displayed for all the files in the results pane of the Command window. Manifest constants to represent the columns are created with the #define preprocessor directive to make the code more readable.

#define ARRAY_DIR_NAME 1 // Manifest constants for columns returned by dirExt( )

#define ARRAY_DIR_SIZE 2

#define ARRAY_DIR_DATE 3

#define ARRAY_DIR_TIME 4

#define ARRAY_DIR_ATTR 5

#define ARRAY_DIR_SHORT_NAME 6

#define ARRAY_DIR_CREATE_DATE 7

#define ARRAY_DIR_CREATE_TIME 8

#define ARRAY_DIR_ACCESS_DATE 9

aFiles = new Array() // Array will be resized as needed

nFiles = aFiles.dirExt("\*.*", "HS") // Include Hidden and System files

for nFile = 1 to nFiles

   ? aFiles[ nFile, ARRAY_DIR_NAME ]  

   ?? aFiles[ nFile, ARRAY_DIR_ACCESS_DATE ] at 25 

endfor