- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Get Path of open script
I'm wondering if you can get the path of an open script like you can with a data table.
Names default to here(1);
// data tables, cool
dt = open("$SAMPLE_DATA\Big Class.jmp");
show(dt << Get Path());
// scripts, not so much.
w = open("$SAMPLE_DATA\..\scripts\bootstrapsample.jsl");
show(w << Get Path());
Vince Faller - Predictum
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Get Path of open script
Hi @vince_faller ,
I found this community solution to be helpful and I think it'll do the trick for you, at least in part.
Apparently, once the JSL file is open, you can have a line that says Convert File Path(""); and it will show you the current directory. But, I think you need to run it from within the JSL script file. It appears that if you run it from another script window, then it returns the JMP file path.
Hope this helps!,
DS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Get Path of open script
Yeah it needs to be external. This doesn't work for me.
Vince Faller - Predictum
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Get Path of open script
Vince,
I have used include file list() before to get the path of a script.
include file list()
Don't know if this does what you need.
John