newbook;
string fname, path$=system.path.program$ + "Samples\Batch Processing\";
findfiles fname:=fname$ ext:="*.csv";
int num = fname.GetNumTokens(CRLF);
wbook.dc.add("CSV");
loop(ii,1,num)
{
next$ = fname.GetToken(ii, CRLF)$;
if (ii==1)
{
wks.dc.flags=256; // turn on append rows mode
}
wks.dc.source$=next$;
Tree tr1=wks.dc.optn$;
tr1.settings.partial.SetAttribute("Use", 1);
tr1.settings.partial.row$="2";
tr1.ToString(wks.dc.optn$);
wks.dc.import();
}