<?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: set default directory in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/set-default-directory/m-p/64911#M34262</link>
    <description>&lt;P&gt;A track was entered for this request. As a result, the behavior was reported to Development. The response to this report was the following:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In its current implementation, Set Default Directory() lasts only for the&lt;BR /&gt;current JSL execution. The default directory needs to get reset to the current JSL file's&lt;BR /&gt;directory for relative paths to work.&lt;/P&gt;</description>
    <pubDate>Mon, 30 Jul 2018 14:09:39 GMT</pubDate>
    <dc:creator>Dahlia_Watkins</dc:creator>
    <dc:date>2018-07-30T14:09:39Z</dc:date>
    <item>
      <title>set default directory</title>
      <link>https://community.jmp.com/t5/Discussions/set-default-directory/m-p/14023#M13157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the script I am writing, I ask the user for a file to import (an Excel file).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then create a folder at the same level as the imported file to store all the analysis in on spot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script basically does&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #032ce4;"&gt;if&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;directory exists&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;saveDirectory&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; &lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; &lt;SPAN style="color: #032ce4;"&gt;create directory&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;saveDirectory&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #032ce4;"&gt;set default directory&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;saveDirectory&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #032ce4;"&gt;&lt;SPAN style="color: #011993;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #032ce4;"&gt;&lt;SPAN style="color: #011993;"&gt;The rest of the script saves png files as analysis results.&amp;nbsp; (Please make the PowerPoint output usable, but that is another issue).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #032ce4;"&gt;&lt;SPAN style="color: #011993;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #011993; font-size: 12px; font-family: Courier;"&gt;This works fine on my Mac but does not work with users running Windows.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #011993; font-size: 12px; font-family: Courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #011993; font-size: 12px; font-family: Courier;"&gt;The directory is created, but the set default directory is not respected.&amp;nbsp; It is uses the JMP folder in the program files.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #011993; font-size: 12px; font-family: Courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #011993; font-size: 12px; font-family: Courier;"&gt;I am on JMP 12 and the users are on JMP 11.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #011993; font-size: 12px; font-family: Courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #011993; font-size: 12px; font-family: Courier;"&gt;Is this a known bug or do I need to do something different for the Windows version?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #011993; font-size: 12px; font-family: Courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #011993; font-size: 12px; font-family: Courier;"&gt;Andy&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #011993; font-size: 12px; font-family: Courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #011993; font-size: 12px; font-family: Courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 20:17:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/set-default-directory/m-p/14023#M13157</guid>
      <dc:creator>Hegedus</dc:creator>
      <dc:date>2015-08-27T20:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: set default directory</title>
      <link>https://community.jmp.com/t5/Discussions/set-default-directory/m-p/14024#M13158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using both JMP 11 and JMP 12 I don't have issues on windows.&amp;nbsp; One thing to know while debugging, if I run the below script as one it runs fine.&amp;nbsp; But if I try to run Part 1 THEN Part 2 there is an IO error.&amp;nbsp; Setting the default directory seems to be a private variable since it doesn't stick.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Part 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; saveDirectory = "C:\TEMP";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(directory exists(saveDirectory),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create directory(saveDirectory)&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set default directory(saveDirectory);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; text = "test";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Part 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; save text file("test.txt", text);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; open("test.txt");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure why it isn't working, but as a work around you can always do a simple two step modification:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; filepath = saveDirectory || "example.png";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pic_obj &amp;lt;&amp;lt; Save Picture( filepath, "png" );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would also worry about write permissions if they are trying to save a secure directory, but that doesn't seem to be an issue since as you say, the directory is created.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 20:40:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/set-default-directory/m-p/14024#M13158</guid>
      <dc:creator>msharp</dc:creator>
      <dc:date>2015-08-28T20:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: set default directory</title>
      <link>https://community.jmp.com/t5/Discussions/set-default-directory/m-p/14025#M13159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am seeing similar things.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am doing exactly what you do in Part 2.&amp;nbsp; This works fine on a Mac and also gives me the error on Windows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set Default Directory(saveDirectory) as private variable certainly does not seem the intent.&amp;nbsp; Why would I be able to set some thing I can use?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am also doing the work around, but I shouldn't have to?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 23:52:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/set-default-directory/m-p/14025#M13159</guid>
      <dc:creator>Hegedus</dc:creator>
      <dc:date>2015-08-28T23:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: set default directory</title>
      <link>https://community.jmp.com/t5/Discussions/set-default-directory/m-p/14026#M13160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;Yeah it definitely feels like a bug.&amp;nbsp; You can submit a case to &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:support@jmp.com"&gt;support@jmp.com&lt;/A&gt;&lt;SPAN&gt; and see what they say.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 13:59:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/set-default-directory/m-p/14026#M13160</guid>
      <dc:creator>msharp</dc:creator>
      <dc:date>2015-08-31T13:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: set default directory</title>
      <link>https://community.jmp.com/t5/Discussions/set-default-directory/m-p/64911#M34262</link>
      <description>&lt;P&gt;A track was entered for this request. As a result, the behavior was reported to Development. The response to this report was the following:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In its current implementation, Set Default Directory() lasts only for the&lt;BR /&gt;current JSL execution. The default directory needs to get reset to the current JSL file's&lt;BR /&gt;directory for relative paths to work.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 14:09:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/set-default-directory/m-p/64911#M34262</guid>
      <dc:creator>Dahlia_Watkins</dc:creator>
      <dc:date>2018-07-30T14:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: set default directory</title>
      <link>https://community.jmp.com/t5/Discussions/set-default-directory/m-p/180812#M40237</link>
      <description>&lt;P&gt;I'm having the same issue.&amp;nbsp; Is there a workaround?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to run a script where the user navigates and selects a data table to open.&lt;/P&gt;&lt;P&gt;After the script is complete, the user may immediately run the script a second time, and I'd like to default to the last directory they selected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 16:16:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/set-default-directory/m-p/180812#M40237</guid>
      <dc:creator>SW</dc:creator>
      <dc:date>2019-03-01T16:16:16Z</dc:date>
    </item>
  </channel>
</rss>

