<?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 How to Save Queried Data Table to a Specified Folder through script? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-Save-Queried-Data-Table-to-a-Specified-Folder-through/m-p/381587#M63209</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hi! Does anyone here knows how to save a queried data table to a specified folder through jmp script? Can't seem to find the right way in doing it... Thanks in advance!&lt;/P&gt;&lt;P&gt;Here's my sample script:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Data Table( "name of data table" );


//save raw data table to a folder

dt = current data table ();
filepath = "C:\Users\folder path";
dt&amp;lt;&amp;lt; save(filepath || "name of data table.jmp");

&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 10 Jun 2023 23:29:38 GMT</pubDate>
    <dc:creator>ramisola</dc:creator>
    <dc:date>2023-06-10T23:29:38Z</dc:date>
    <item>
      <title>How to Save Queried Data Table to a Specified Folder through script?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Save-Queried-Data-Table-to-a-Specified-Folder-through/m-p/381587#M63209</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hi! Does anyone here knows how to save a queried data table to a specified folder through jmp script? Can't seem to find the right way in doing it... Thanks in advance!&lt;/P&gt;&lt;P&gt;Here's my sample script:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Data Table( "name of data table" );


//save raw data table to a folder

dt = current data table ();
filepath = "C:\Users\folder path";
dt&amp;lt;&amp;lt; save(filepath || "name of data table.jmp");

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:29:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Save-Queried-Data-Table-to-a-Specified-Folder-through/m-p/381587#M63209</guid>
      <dc:creator>ramisola</dc:creator>
      <dc:date>2023-06-10T23:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to Save Queried Data Table to a Specified Folder through script?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Save-Queried-Data-Table-to-a-Specified-Folder-through/m-p/381592#M63210</link>
      <description>&lt;P&gt;I suspect the issue is that there is a "/" missing between your filepath and "name of data table.jmp".&amp;nbsp; Below is a working script that&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Open( "$SAMPLE_DATA\big class.jmp" );

dt = Data Table( "big class" );
filepath = "$TEMP";

Wait( 5 ); // placed for the example so the table will be visible

dt &amp;lt;&amp;lt; save( filepath || "\" || "mytable.jmp" );

Close( dt, nosave );

Wait( 5 );  // placed so for the example one can see the table is closed

Open( filepath || "\" || "mytable.jmp" );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 01 May 2021 08:58:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Save-Queried-Data-Table-to-a-Specified-Folder-through/m-p/381592#M63210</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-05-01T08:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to Save Queried Data Table to a Specified Folder through script?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Save-Queried-Data-Table-to-a-Specified-Folder-through/m-p/381603#M63211</link>
      <description>&lt;P&gt;Yes. Most of the time it seems to work better to keep a trailing slash on a path:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;path = "$temp/mywork/";&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Most (all?) functions that need just a path, without a file, are happy with it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;path = "$temp/mywork/";
show(convertFilePath(path,"windows"));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&lt;STRONG&gt;Convert File Path(path, "windows") = "C:\Users\v1\AppData\Local\Temp\mywork\";&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and it is clearly not a full filename to anyone looking at the code later.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 01 May 2021 12:30:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Save-Queried-Data-Table-to-a-Specified-Folder-through/m-p/381603#M63211</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2021-05-01T12:30:50Z</dc:date>
    </item>
  </channel>
</rss>

