Script Reference : FileEnumerator

The FileEnumerator  class describes file enumerator object which can help to find files in the specified folder.

Data Members
Name Type Description
folder string Folder name. Read only.
fileName string Current file name. Read only.
fileSize int Size of the current file. Read only.
fullFileName string readonly
fileTime Date File last write time.

 

Constructors
Name Description
FileEnumerator::FileEnumerator(string folder, string mask) Creates a FileEnumerator object and initializes all data to defaults. This is the default constructor.

 

Methods
Name Return Type Description
bool Next() bool Returns true if next file was found

 

Sample code:

// load first 10 files from folder
local fe=FileEnumerator(window.GetFolder("arc"),"*.priPrinter");
local index=0;
while(fe.Next())
{
	print(fe.filename+"\n");
	if(index<10)
	{
	   window.Merge(fe.fullFilename);
	}
	index++;
}