Jmp script: How to get the directory info for .CSV or .TXT files opened in jmp? when I use "get path", jmp simply shows the file name with .jmp in the end.
Thanks a bunch!
First time posting question here, forgive me if I did not follow the rules well.
I think get path works as expected here: a text file is imported rather than opened and if the resulting JMP data table has not yet been saved, get path will return the table name only.
However, the path of an imported file is stored as JSL in the table property "Source". Unless this has been overwritten by subsequent table operations (e.g. Concatenate or Update) the path can be retrieved from that code.
dt = Open("$SAMPLE_IMPORT_DATA/Book1.csv");
path = Arg(dt << get property("Source"), 1);