@FILEARRAY[array,filename] : Read the specified file and store the resulting lines in the specified array variable (one line per element). The array must be one-dimensional.

 

You must define the array before running @FILEARRAY. For example:

 

setarray aresult[10]

echo %@filearray[aresult,test.dat]

 

@FILEARRAY will read the number of lines specified in the array size definition, or the number of lines in the files (whichever is less).

 

@FILEARRAY will return the number of lines read.