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.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

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

Access to folder above main script

I am currently using the Get Default Directory function to run a script in a subfolder of my main script, using the following code

 

relativePath = Get Default Directory();

Include(relativePath || "Folder1/Data import.jsl");

How can I run a script or open a file in a folder above my main script, i.e. in a directory higher than the full directory given by Get Default Directory function?

1 ACCEPTED SOLUTION

Accepted Solutions
mmarchandTSI
Level V

Re: Access to folder above main script

This should work for you.

 

Names Default To Here( 1 );
relativePath = Get Default Directory();
UPone = Left( relativePath, Contains( relativePath, "/", -2 ) );

View solution in original post

3 REPLIES 3
mmarchandTSI
Level V

Re: Access to folder above main script

This should work for you.

 

Names Default To Here( 1 );
relativePath = Get Default Directory();
UPone = Left( relativePath, Contains( relativePath, "/", -2 ) );
Steffen_Bugge
Level IV

Re: Access to folder above main script

Thanks for the reply @mmarchandTSI !

 

This takes me one level up, but what if I need two levels up?

Steffen_Bugge
Level IV

Re: Access to folder above main script

relativePath = Get Default Directory();
UPtwo = Left( relativePath, Contains( relativePath, "/Folder1/", -2 ) );

Thanks again @mmarchandTSI, I solved it with the above code. 

Recommended Articles