<?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: Saving to disk as hidden or read-only in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Saving-to-disk-as-hidden-or-read-only/m-p/255191#M50094</link>
    <description>Thanks Craige, This opens some neat doorways.</description>
    <pubDate>Tue, 31 Mar 2020 02:32:45 GMT</pubDate>
    <dc:creator>mann</dc:creator>
    <dc:date>2020-03-31T02:32:45Z</dc:date>
    <item>
      <title>Saving to disk as hidden or read-only</title>
      <link>https://community.jmp.com/t5/Discussions/Saving-to-disk-as-hidden-or-read-only/m-p/254865#M50041</link>
      <description>&lt;P&gt;I have .jsl script that pulls data from a SQL server and saves it as .jmp &amp;amp; .xlsx.&amp;nbsp; The .jmp file is so I can look at the data without waiting for the SQL query. The .xlsx file is so a different .xlsm file can read it (also without waiting) and run other macros as needed.&lt;/P&gt;&lt;P&gt;However, some people without JMP open the .xlsx file to read the data.&amp;nbsp; And then they don't close it - which means the .jsl cannot save a new updated copy (every hour) -- which means the .xlsm is using stale data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the .jsl file to save a hidden copy (for the .xlsm file) and a visible copy (for the humans), but it seems having the .jsl save over a hidden file is forbidden.&amp;nbsp; As is, unsurprisingly, saving over a read-only file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I have .jsl save over a hidden file? Can I use .jsl to unhide the file first?&amp;nbsp; Is there a much simpler solution I am overlooking?&amp;nbsp; Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Mar 2020 01:26:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saving-to-disk-as-hidden-or-read-only/m-p/254865#M50041</guid>
      <dc:creator>mann</dc:creator>
      <dc:date>2020-03-29T01:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Saving to disk as hidden or read-only</title>
      <link>https://community.jmp.com/t5/Discussions/Saving-to-disk-as-hidden-or-read-only/m-p/254873#M50043</link>
      <description>&lt;P&gt;two snippets that might be useful&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// make read only: attrib.exe +R &amp;lt;Path&amp;gt;
txt=Run Program(executable("attrib.exe"),options({"+R","\!""||file||"\!""}),readfunction("text"));
if(txt!="",show(txt));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// make NOT read only: attrib.exe -R &amp;lt;Path&amp;gt;
txt=Run Program(executable("attrib.exe"),options({"-R","\!""||convertfilepath(file,windows)||"\!""}),readfunction("text"));
if(txt!="",show(txt));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You should probably use the convertFilePath(... , windows) on the top one as well; the command line program attrib will be expecting a windows style name. I think the code I grabbed these from knows the top one is already OK. Attrib prints nothing when it works. The if(...show...) is for debugging bad path names. The doc says attrib can set and clear the hidden attribute as well.&lt;/P&gt;&lt;P&gt;I think read-only is the way to go; I suspect that will make other programs not lock you out.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Mar 2020 01:43:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saving-to-disk-as-hidden-or-read-only/m-p/254873#M50043</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2020-03-29T01:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Saving to disk as hidden or read-only</title>
      <link>https://community.jmp.com/t5/Discussions/Saving-to-disk-as-hidden-or-read-only/m-p/255191#M50094</link>
      <description>Thanks Craige, This opens some neat doorways.</description>
      <pubDate>Tue, 31 Mar 2020 02:32:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saving-to-disk-as-hidden-or-read-only/m-p/255191#M50094</guid>
      <dc:creator>mann</dc:creator>
      <dc:date>2020-03-31T02:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Saving to disk as hidden or read-only</title>
      <link>https://community.jmp.com/t5/Discussions/Saving-to-disk-as-hidden-or-read-only/m-p/527108#M75100</link>
      <description>&lt;P&gt;Hey Craig, or audience, I'm a true HACK at jsl, if the excel table I want to save as read-only (over a currently opened or hidden *.xlsx file) is at&amp;nbsp;\\Server\Engineering\Project\qbert.xlsx, how can I apply the script above? In the example, is txt the table of interest? And if so, what are the terms text, attrib.exe, and file ? Are those jsl functions or references to the table I'm manipulating?&amp;nbsp; Thanks in advance!!&amp;nbsp; -Devin&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 16:46:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saving-to-disk-as-hidden-or-read-only/m-p/527108#M75100</guid>
      <dc:creator>Devin</dc:creator>
      <dc:date>2022-07-27T16:46:41Z</dc:date>
    </item>
  </channel>
</rss>

