cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

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