Following code will attach all jsl scripts in c:\work directory to the table dt.
Do you know any function/command which can also make it auto-run on the table?
dt = Current Data Table();
dir = "C:\work";
fileNames = Files In Directory( dir );
if (dir!="",
For( iFile = 1, iFile <= N Items( fileNames ), iFile++,
filename = fileNames[iFile];
show(filename);
If( Ends With( filename, ".jsl" ),
file_path = dir || "\" || filename;
show(file_path);
x = Load Text File( file_path );
Eval( Parse( "dt << new script(filename," || x || ")" ) );
);
);
);