Doing what you want to do, if you didn't want the Source Table Column, is very simple
Names Default To Here( 1 );
Clear Globals();
// Create your Tables list
Tables = {};
For( i = 1, i <= N Table(), i++,
Insert Into( Tables, Data Table( i ) << get name );
);
new Table("all data");
// Run the concatinations
For( i = 1, i <= N Items( Tables ), i++,
Data Table( "all data" ) << Concatenate(
Data Table( Tables[i] ),
append to first table(1)
);
Close( Data Table( Tables[i] ), No Save );
);
It gets more complex if you want a Source Table. Using the built in option of "Create Source Column", will produce a new Source Table column for each concatenation you do. So some adjustments need to be made. Below is a working script that should give you what you want
Names Default To Here( 1 );
Clear Globals();
// Create your Tables list
Tables = {};
TablesN = {};
For( i = 1, i <= N Table(), i++,
Insert Into( Tables, Data Table( i ) << get name );
for(k=1,k<=n rows(data table(i)),k++, insert into(TablesN,data table( i ) << get name));
);
new Table("all data");
// Run the concatinations
For( i = 1, i <= N Items( Tables ), i++,
Data Table( "all data" ) << Concatenate(
Data Table( Tables[i] ),
append to first table(1)
);
Close( Data Table( Tables[i] ), No Save );
);
data table( "all data" ) << add multiple columns("Source Table", 1, before first, character );
:Source Table << set values( TablesN );
Jim