Rather than use default Open file function, you just open the file through add-in.
I've tested simple script like below to convert "case_id" to nominal, for 2 TSV files inside 1 folder.
Pls mind the path that I set is "Documents/TSV".
You can change the path for testing at your PC.
If all good, then you can convert this JSL script to add-in (refer to https://community.jmp.com/t5/Learning-Center/Add-In-Builder/ta-p/276711 )
Hope it helps.
//Open Table to pick file
Names Default To Here( 1 );
file = Pick File(
"Select the TSV file to input",
"$DOCUMENTS/TSV",
{"All Files|*"},
1,
0
);
If( file != "",
dt1 = Open(
file,
Import Settings(
End Of Line( CRLF, CR, LF ),
End Of Field( Tab, CSV( 0 ) ),
Strip Quotes( 0 ),
Use Apostrophe as Quotation Mark( 0 ),
Use Regional Settings( 0 ),
Scan Whole File( 1 ),
Treat empty columns as numeric( 0 ),
CompressNumericColumns( 0 ),
CompressCharacterColumns( 0 ),
CompressAllowListCheck( 0 ),
Labels( 1 ),
Column Names Start( 1 ),
First Named Column( 1 ),
Data Starts( 2 ),
Lines To Read( "All" ),
Year Rule( "20xx" )
)
)
);
//Standardize "case_ID" to character nominal
Names Default To Here( 1 );
dt1 :case_id << Data Type( Character ) <<
Set Modeling Type( "Nominal" );