cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • See how to interactively organize and restructure data for analysis. Register for May 29 webinar, 2pm US ET.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
SCWong
Level II

JSL - opening files in the same folder

Hi all,

I have 3 files in a folder that i'm working with.

A = master datatable

B = Source 1

C = Source 2

 

I'm trying to write a script that can update information from B and C into A. How do I call up the datatables B and C without typing in the entire path of the file? Reason being there might be other people who will download this entire folder to use so I want the file path to be flexible.

 

Thanks.

1 REPLY 1
jthi
Super User

Re: JSL - opening files in the same folder

Depends a little how you are opening the A file. Below is one idea how you could approach this:

Names Default To Here(1);
dt_A = Open("$SAMPLE_DATA/Boston Housing.jmp");
a_path = Convert File Path(dt_A << get path);
folder_path = Substr(firstTable, 1, Contains(firstTable, "/", -1));
b_path = folder_path || "B.jmp";
c_path = folder_path || "C.jmp";

 

-Jarmo

Recommended Articles