<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to get the path to the current project file? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/866775#M102943</link>
    <description>&lt;P&gt;Hi now we have JMP 18.2.&lt;BR /&gt;&lt;BR /&gt;where can it be queried?&lt;/P&gt;</description>
    <pubDate>Tue, 08 Apr 2025 09:08:50 GMT</pubDate>
    <dc:creator>cisco_bakro</dc:creator>
    <dc:date>2025-04-08T09:08:50Z</dc:date>
    <item>
      <title>How to get the path to the current project file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/713606#M89709</link>
      <description>&lt;P&gt;If I have a script within a project (or perhaps a reference to the project in a script outside of the project), how to do I get the file path to where the project is saved on disk?&amp;nbsp; I'm interested in doing this with JSL, not interactively.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 17:08:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/713606#M89709</guid>
      <dc:creator>austinspencer</dc:creator>
      <dc:date>2024-01-04T17:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the path to the current project file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/715310#M89825</link>
      <description>&lt;P&gt;Based on the silence, I'm guessing that this may not be (easily) possible?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 16:33:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/715310#M89825</guid>
      <dc:creator>austinspencer</dc:creator>
      <dc:date>2024-01-11T16:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the path to the current project file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/715355#M89828</link>
      <description>&lt;P&gt;I do not find a function specific to a JMP project. There is no path variable for projects either. You are free to save a project anywhere you like. It is a kind of JMP file, so when you open or save a project, JMP will start with the last directory. You can get this information using the Get Default Directory() function.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dir.JPG" style="width: 958px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60268iB2D77A2E47A861BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="dir.JPG" alt="dir.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 16:49:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/715355#M89828</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2024-01-11T16:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the path to the current project file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/715543#M89830</link>
      <description>&lt;P&gt;I struggled with this too. Even if it was possible, it would not work for what I wanted to do because the files in a project are unpacked on demand, not when the project is first opened. My use case was needing a filepath for a resource in the project...that would go to an external program. I wound up using loadtextfile(proj file name)/savetextfile($temp/name) and sending the temp file name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-MESSAGE title="Using a Project for a Project" uid="381632" url="https://community.jmp.com/t5/Uncharted/Using-a-Project-for-a-Project/m-p/381632#U381632" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-blog-thread lia-fa-icon lia-fa-blog lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt; - Audio.jsl passes a file to powershell to play.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are you trying to do?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 17:23:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/715543#M89830</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2024-01-11T17:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the path to the current project file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/717319#M89901</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;What are you trying to do?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;That's a good question, and probably one I should have answered in the original question.&amp;nbsp; When working on a project, sometimes it would be helpful to be able to quickly copy the path to the project to either open the containing folder to view other associated files or to store the link in my notes or send to a coworker.&amp;nbsp; This is a relatively common and useful feature found in many code editors and office suite software.&amp;nbsp; Of course you can just browse to the file through other means, but it's a common enough task for me that it's handy to have a quick method that doesn't require me to mentally parse my file organization structure each time.&amp;nbsp; Thanks for your time!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 15:20:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/717319#M89901</guid>
      <dc:creator>austinspencer</dc:creator>
      <dc:date>2024-01-16T15:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the path to the current project file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/717322#M89902</link>
      <description>&lt;P&gt;Thanks for looking into this.&amp;nbsp; I've had luck using Get Default Directory() in bare scripts, but when a script is saved in a project, it just returns the path inside the project file rather than where the project is stored:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Get Default Directory() = "jmpprj://contents/";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jan 2024 15:25:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/717322#M89902</guid>
      <dc:creator>austinspencer</dc:creator>
      <dc:date>2024-01-16T15:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the path to the current project file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/717356#M89909</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/4084"&gt;@aaron_andersen&lt;/a&gt; , &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2026"&gt;@jules&lt;/a&gt;&amp;nbsp; - He's right; I've resorted to using file-&amp;gt;SaveAs to discover the path in the past. The home window's recent file list is better, offering both copy path and open containing window. Maybe those could also be exposed on data table, script, and project windows as well. The system popup off the title bar might be an alternative to the file menu.&lt;/P&gt;
&lt;P&gt;I think projects may be a special case from JSL; data tables and scripts can already get their path.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 16:45:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/717356#M89909</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2024-01-16T16:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the path to the current project file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/717369#M89912</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/4084"&gt;@aaron_andersen&lt;/a&gt;, &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2026"&gt;@jules&lt;/a&gt;&amp;nbsp; - He's right; I've resorted to using file-&amp;gt;SaveAs to discover the path in the past.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yeah, I've used that on occasion as well.&amp;nbsp; From what I recall, it won't work if you've not saved the project file since opening it though.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;The home window's recent file list is better, offering both copy path and open containing window.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Ah, that's at least a decent workaround.&amp;nbsp; Thanks.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Maybe those could also be exposed on data table, script, and project windows as well. The system popup off the title bar might be an alternative to the file menu.&lt;/P&gt;&lt;P&gt;I think projects may be a special case from JSL; data tables and scripts can already get their path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Having this function in some menu would be great.&amp;nbsp; If it were available through JSL as well, that would be a plus.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 18:53:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/717369#M89912</guid>
      <dc:creator>austinspencer</dc:creator>
      <dc:date>2024-01-16T18:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the path to the current project file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/804253#M98173</link>
      <description>&lt;P&gt;Better late than never (I hope), I think what you're looking for is the Project File Path() message on the project itself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From outside the project:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;project = Open( "$SAMPLE_PROJECTS/Big Class.jmpprj" );

path = project &amp;lt;&amp;lt; project file path();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or inside the project using this project():&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;project = Open( "$SAMPLE_PROJECTS/Big Class.jmpprj" );

project &amp;lt;&amp;lt; Run Script( 
    // this line should work from any JSL script executed from within the project
    path = this project() &amp;lt;&amp;lt; project file path()
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Oct 2024 15:53:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/804253#M98173</guid>
      <dc:creator>aaron_andersen</dc:creator>
      <dc:date>2024-10-08T15:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the path to the current project file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/804290#M98181</link>
      <description>&lt;P&gt;Hi Aaron,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Always better late than never!&amp;nbsp; Is "project file path" new to JMP 18?&amp;nbsp; When I run the script in JMP 17, I get:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Object 'Project' does not recognize the message 'project file path'; perhaps you mean one of these:  &amp;lt;&amp;lt;Project Settings... &amp;lt;&amp;lt;Show Recent Files &amp;lt;&amp;lt;Reset Layout &amp;lt;&amp;lt;Get Layout &amp;lt;&amp;lt;Set Layout &amp;lt;&amp;lt;Run Script &amp;lt;&amp;lt;Set Report Title &amp;lt;&amp;lt;Dispatch &amp;lt;&amp;lt;Show Properties &amp;lt;&amp;lt;Get Script &amp;lt;&amp;lt;Get Display Path &amp;lt;&amp;lt;Get Project &amp;lt;&amp;lt;GetOffset &amp;lt;&amp;lt;Get Width &amp;lt;&amp;lt;Set Width &amp;lt;&amp;lt;Get Property List &amp;lt;&amp;lt;Get Properties &amp;lt;&amp;lt;Get Property List &amp;lt;&amp;lt;Get Properties &amp;lt;&amp;lt;Get Project.&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Austin&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2024 17:54:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/804290#M98181</guid>
      <dc:creator>austinspencer</dc:creator>
      <dc:date>2024-10-08T17:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the path to the current project file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/809353#M98928</link>
      <description>&lt;DIV&gt;// I had a similar problem with removing the file name from the file path&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Names Default To Here( 1 );&lt;/DIV&gt;&lt;DIV&gt;dt = Current Data Table();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;current_file = dt &amp;lt;&amp;lt; Get Path();&lt;/DIV&gt;&lt;DIV&gt;current_directory = Word([1 -2], current_file, "\");&lt;/DIV&gt;&lt;DIV&gt;// return the full string ([1 -1]), except for the last word ([1 -2])&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;data = Pick File(&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Select Data Files",&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;current_directory,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{"Excel|csv","JMP Files|jmp;jsl;jrn","All Files|*"},&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;1,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;0,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"", multiple&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;);&lt;/DIV&gt;</description>
      <pubDate>Thu, 31 Oct 2024 14:12:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/809353#M98928</guid>
      <dc:creator>Crew</dc:creator>
      <dc:date>2024-10-31T14:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the path to the current project file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/817218#M99654</link>
      <description>&lt;P&gt;It turns out that message isn't available until (the future) JMP 18.2.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In fact, I appears that I actually added it earlier this year in response to this question, but incorrectly marked it as having existing since JMP 14. Then I somehow&lt;EM&gt; forgot that I had done so&lt;/EM&gt;, such that on reencountering this thread a few months later, I went looking for a solution and found the one I had recently created (but thought it was much older than it was).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry about that.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 14:41:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/817218#M99654</guid>
      <dc:creator>aaron_andersen</dc:creator>
      <dc:date>2024-11-21T14:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the path to the current project file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/818220#M99676</link>
      <description>&lt;P&gt;Ah, I love the story.&amp;nbsp; No worries. I can only laugh because it sounds exactly like the sort of thing I would do.&amp;nbsp; The number of times I've written a function to solve a problem only to find I had made the exact same thing&amp;nbsp;under a different name&lt;SPAN&gt;&amp;nbsp;6 months prior...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway, I'm glad to hear the functionality is on the way!&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2024 15:27:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/818220#M99676</guid>
      <dc:creator>austinspencer</dc:creator>
      <dc:date>2024-11-22T15:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the path to the current project file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/866775#M102943</link>
      <description>&lt;P&gt;Hi now we have JMP 18.2.&lt;BR /&gt;&lt;BR /&gt;where can it be queried?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 09:08:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/866775#M102943</guid>
      <dc:creator>cisco_bakro</dc:creator>
      <dc:date>2025-04-08T09:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the path to the current project file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/866832#M102948</link>
      <description>&lt;P&gt;In JSL.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;path = this project() &amp;lt;&amp;lt; project file path();
show(path);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Tested in 19EA.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 13:53:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-the-path-to-the-current-project-file/m-p/866832#M102948</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2025-04-08T13:53:03Z</dc:date>
    </item>
  </channel>
</rss>

