Hello,
There is one argument called 'nFile' which is 'The file index number in an ordered sequence of imported files';
The nFile begins with 0, in order to count the amount of files, please try the code below in your main function:
static int nTotalFiles;
int import_Files(Layer &lyTarget, TreeNode &trFilter, LPCSTR lpcszFile, int nFile)
{
...
nTotalFiles = nFile;
}
nTotalFiles = nFile+1;
the nTotalFiles is the total number of files. Because If you import n files, your function gets called n times, nTotalFiles will increase n times.
For further information, please contact tech@originlab.com
Best regards!
Jason
OriginLab Technical Service