Here is a simple script that will concatenate all open data tables after deleting the last 5 rows in each table.
Names Default To Here( 1 );
tableList = {};
For( i = 1, i <= N Table(), i++,
Data Table( i ) << delete rows(
Index( N Rows( Data Table( i ) ) - 4, N Rows( Data Table( i ) ) )
);
Insert Into( tableList, Data Table( i ) << get name );
);
dt = New Table( "All Tables" );
For( i = 1, i <= N Items( tableList ), i++,
dt << concatenate( Data Table( tableList[i] ), append to first table( 1 ) )
);
Jim