OriginPro 2019, Win7Pro
Hello!
I want to give a path as parameter and then
let labtalk loop over all subfolder, in
every subfolder find all xls and doing
something with them.
The code I put here are only the booth mainloops
outside.
Inside the innerloop I do something with
imExcel and plotting. This is working.
First I have only the loop over the xls, which
was working and I now added the outer loop
looping over all subfolders.
But then it is not longer running, but
I dont find out, what is going wrong there?
How can I get it running?
string folder$;
string fname$;
string path$;
path$ = %1;
int number;
findfolders addpath:=1 n:=number;
for (int j=1; j<=number; j++)
{
findFiles path:=folder.GetToken(j, CRLF)$ ext:="*.xls" addpath:=0;
int nn = fname.GetNumTokens(CRLF);
string fnnamesav$ = fname$;
type "";
#type "Pfad: $(path)";
type "files found: $(nn)";
type "";
for (int i=1; i<=1; i++) // nn
{
string strFilename$ = fname.GetToken(i, CRLF)$;
#type strfilename$;
string name$ = strfilename$;
int ibis = name.Len();
int ibis = $(ibis) - 4;
string fn$ = name.mid(1,$(ibis))$;
type "opening $(i) with: %(fn$)";
fname$ = fnnamesav$;
}
}
Regards, Astrid