You can easily filter the list of files returned from Files in Directory, to return only .csv files
Names Default To Here( 1 );
files = Files In Directory( "C:\Program Files\JMP\JMPPRO\18\Samples\Import Data", recursive( 0 ) );
onlycsv = Filter Each( {x}, files, contains(x,".csv"));
You may also want to look into using Multiple File Import. If your .csv files are similar MFI can automatically concatenate them for you
Names Default To Here( 1 );
mfi = Multiple File Import();
mfi << Set Folder( "$SAMPLE_IMPORT_DATA" );
mfi << Set Name Filter( "*.csv" );
mfi << Set Name Enable( 1 );
mfi << Set Stack Mode( "Stack Similar" );
mfi << Set Subfolders( 0 );
tables = mfi << Import Data();
Jim