Anyone can help to fix the jsl below,
The goal is to open all dat file under the same directory and delete 2 rows, then save it.
Thanks
directory = Pick Directory();
fileNames = Files In Directory( directory );
For( iFile = 1, iFile <= N Items( fileNames ), iFile++,
filename = fileNames[iFile];
If( Ends With( filename, ".dat" ),
dt = Open( directory || filename );
//delete first 2 rows
dt << Select Where( Row() < 3 );
dt << delete rows;
Close( dt, "save" );
);
);