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.

JMP Wish List

We want to hear your ideas for improving JMP. Share them here.
Choose Language Hide Translation Bar
0 Kudos

Include use the parent default directory.

I would love it if I could force include() to use the default directory of the parent (or whatever I have set it to, instead of creating its own).  

For example

Names default to here(1);
dir = convert file path("$DESKTOP\TestDefaultDirectory\");
create directory(dir);
parent = JSLQuote(
	Set Default Directory(convert file path("$DESKTOP"));
	print("Parent");
	show(Get Default Directory());
	
	include("TestDefaultDirectory\child.jsl");
	
	print("Parent");
	show(Get Default Directory());
);

save text file(convert file path("Parent.jsl", base(dir)), parent);

child = JSLQuote(
	print("Child");
	show(Get Default Directory());
);
save text file(convert file path("Child.jsl", base(dir)), child);
nw = open(convert file path("Parent.jsl", base(dir)));
script = nw[scriptbox(1)];
script << Run();

Returns

"Parent"
Get Default Directory() = "/Desktop/";
"Child"
Get Default Directory() = "/Desktop/TestDefaultDirectory/";
"Parent"
Get Default Directory() = "/Desktop/";

I want the child to also return "/Desktop/"

 

1 Comment
Ryan_Gilmore
Community Manager
Status changed to: Archived
We are archiving this request. If this is still important please comment with additional details and we will reopen. Thank you!