cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

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!