<?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 extracting the directory of a jmp file in JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/extracting-the-directory-of-a-jmp-file-in-JSL/m-p/423107#M67225</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have managed to do what I want in a convoluted way (using word and character manipulations) &amp;nbsp;but I feel there must be an easier way to do this. All I want is to extract the directory of a file I just selected using the Pick File function in JSL so that the next time, it starts from that directory. Any suggestions??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, Yves&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 19:58:26 GMT</pubDate>
    <dc:creator>yvesprairie</dc:creator>
    <dc:date>2023-06-09T19:58:26Z</dc:date>
    <item>
      <title>extracting the directory of a jmp file in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/extracting-the-directory-of-a-jmp-file-in-JSL/m-p/423107#M67225</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have managed to do what I want in a convoluted way (using word and character manipulations) &amp;nbsp;but I feel there must be an easier way to do this. All I want is to extract the directory of a file I just selected using the Pick File function in JSL so that the next time, it starts from that directory. Any suggestions??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, Yves&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:58:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/extracting-the-directory-of-a-jmp-file-in-JSL/m-p/423107#M67225</guid>
      <dc:creator>yvesprairie</dc:creator>
      <dc:date>2023-06-09T19:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: extracting the directory of a jmp file in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/extracting-the-directory-of-a-jmp-file-in-JSL/m-p/423111#M67226</link>
      <description>&lt;P&gt;Check out the Files in Directory() function in the Scripting Index&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1633216297555.png" style="width: 632px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/36251iD3BEAC10587BBA7E/image-dimensions/632x317?v=v2" width="632" height="317" role="button" title="txnelson_0-1633216297555.png" alt="txnelson_0-1633216297555.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Oct 2021 23:11:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/extracting-the-directory-of-a-jmp-file-in-JSL/m-p/423111#M67226</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-10-02T23:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: extracting the directory of a jmp file in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/extracting-the-directory-of-a-jmp-file-in-JSL/m-p/423122#M67227</link>
      <description>&lt;P&gt;Sorry I pressed the wrong button!!! Unfortunately, this is not a solution &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;. This only lists the files of a known directory. I want to browse to find the file I want and once I have chosen it, I want to save the directory so that next time I want to browse , it starts at that previous directory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers, Yves&lt;/P&gt;</description>
      <pubDate>Sat, 02 Oct 2021 23:30:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/extracting-the-directory-of-a-jmp-file-in-JSL/m-p/423122#M67227</guid>
      <dc:creator>yvesprairie</dc:creator>
      <dc:date>2021-10-02T23:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: extracting the directory of a jmp file in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/extracting-the-directory-of-a-jmp-file-in-JSL/m-p/423133#M67228</link>
      <description>&lt;P&gt;Take a look at my script below, and tell me if I am getting closer to what you want.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
theDirectory = "";
xx = Pick File( "Pick a File", theDirectory );
theDirectory = Substr( xx, 1, Length( xx ) - Length( Word( -1, xx, "\/" ) ) - 1 );


// now this Pick File will go to the directory that the file from the last
// Pick File was selected from
yy = Pick File( "Pick a File", theDirectory );

// If you want this Pick File to span across different scripts, then it would be a simple
// matter to save the directory in a specific namespace and get the 
// directory location from a variable saved in that namespace.

// If you want to have the Pick File directory available from JMP session to JMP session
// then what I have used in the past, is to simply save the character string for the 
// directory to a .txt file, using Save Text File() and Load Text File() to make the directory 
// persistant&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 03 Oct 2021 03:26:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/extracting-the-directory-of-a-jmp-file-in-JSL/m-p/423133#M67228</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-10-03T03:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: extracting the directory of a jmp file in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/extracting-the-directory-of-a-jmp-file-in-JSL/m-p/423142#M67230</link>
      <description>&lt;P&gt;Yes this works great! It is close (but better) than what I had come up with. I just thought there should be a built-in function to extract the location (the directory path) of a file. Many thanks&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards, Yves&lt;/P&gt;</description>
      <pubDate>Sun, 03 Oct 2021 14:12:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/extracting-the-directory-of-a-jmp-file-in-JSL/m-p/423142#M67230</guid>
      <dc:creator>yvesprairie</dc:creator>
      <dc:date>2021-10-03T14:12:32Z</dc:date>
    </item>
  </channel>
</rss>

