Hi,
I want to use a for loop to keep import multiple files and close it after concatenate. the import multiple and concatenate is working but not the close(). I tried wait(), still not working. Not sure what I did wrong.
dt1 = New table();
dir = {"dir1","dir2","dir3"}; //can have many dirs
for(i=1, i<= N Items(dir), i++,
dt[i] = Multiple File Import(
<<Set Folder( path1||"\" || dir[i] ),
<<Set Show Hidden( 0 ),
<<Set Subfolders( 0 ),
<<Set Name Filter( "*.csv*;" ),
<<Set Name Enable( 1 ),
<<Set Add File Name Column( 1 ),
<<Set Add File Size Column( 0 ),
<<Set Add File Date Column( 0 ),
<<Set Import Mode( "CSVData" ),
<<Set Charset( "Best Guess" ),
<<Set Stack Mode( "Stack Similar" ),
<<Set CSV Has Headers( 0 ),
) << Import Data,
dt1 << Concatenate(dt[i],Append to first table( 1 ));
close (dt[i],nosave); //this is the step dont seems taken effect. table not close
);