This example uses Files In Directory to get a list of all the files in a directory. It then looks for all the .jmp files, opens (and later closes) them one by one, making a summary table along the way. The $sample_data directory has sub-directories which will be in the list but are skipped by the EndsWith test. EndsWith is case sensitive; you might want EndsWith(LowerCase(filename), ".jmp") to get the files that end in .JMP and .jmp.
Files In Directory does not need the trailing /, but doesn't mind it either. But the trailing / is important when the file names in the list are concatenated to the directory. JMP takes care of the windows vs mac / and \ issues.
directory = "$sample_data/";
fileNames = Files In Directory( directory );
summary = New Table( "summary", New Column( "name", character ), New Column( "rows", numeric ) );