<?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 open 1st file and analyze it, then close and open the 2nd file, etc in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-open-1st-file-and-analyze-it-then-close-and-open-the-2nd/m-p/279362#M54153</link>
    <description>&lt;P&gt;Here is some psudo code that should show you the direction to take to solve your issue.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);

dtPath = open(Open("C:\users\path.csv");

thePath = dtPath:Column 1[1];

dtSecond = Open("C:Users\" || thePath || "\file.cvs");

myRandom = char( RandomIntiger(11111111,99999999));

dtSecond &amp;lt;&amp;lt; save("c\users\" || myRandom || ".csv" );

close( dtPath, nosave );
close( dtSecond, nosave );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Since it appears that you have a desire to get into JMP Scripting, you really need to take the time to read the Scripting Guide from the JMP Documentation Library.&amp;nbsp; Your current request is solved using the very basic parts of JSL, all of which is covered in the Scripting Guide.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jul 2020 02:15:52 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2020-07-16T02:15:52Z</dc:date>
    <item>
      <title>How to open 1st file and analyze it, then close and open the 2nd file, etc</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-open-1st-file-and-analyze-it-then-close-and-open-the-2nd/m-p/279358#M54152</link>
      <description>&lt;P&gt;Hi I have a jsl want to use and run many files in different folders, then save the file with a name.&lt;/P&gt;&lt;P&gt;My solution is to put all the all the files path/directory into one excel file,&lt;/P&gt;&lt;P&gt;then run the path from row 1 to end.&lt;/P&gt;&lt;P&gt;There are 2 problems,&lt;/P&gt;&lt;P&gt;1. How to read the path file and use it to open the csv data,&lt;/P&gt;&lt;P&gt;2. How to save the file with a name that won't be overwritten, it can be the value of Column1,Row1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can some one give some idea how to start the jsl?&lt;/P&gt;&lt;P&gt;It could be something as below,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Open("C:\users\path.csv);&lt;/P&gt;&lt;P&gt;// open path file and read row 1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Open("C:\users\............\file1.csv);&lt;/P&gt;&lt;P&gt;// 1st problem, this ............... path should be read from the path.csv row 1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dt &amp;lt;&amp;lt; save( "C:\users\file1_data1.csv" );&lt;/P&gt;&lt;P&gt;// after running, save the file, the 2nd problem is how to name the file, so it will not be overwrite by other files when saving, it can be random name but not be overwritten.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;close all(Data Tables);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:32:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-open-1st-file-and-analyze-it-then-close-and-open-the-2nd/m-p/279358#M54152</guid>
      <dc:creator>Stokes</dc:creator>
      <dc:date>2023-06-09T23:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to open 1st file and analyze it, then close and open the 2nd file, etc</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-open-1st-file-and-analyze-it-then-close-and-open-the-2nd/m-p/279362#M54153</link>
      <description>&lt;P&gt;Here is some psudo code that should show you the direction to take to solve your issue.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);

dtPath = open(Open("C:\users\path.csv");

thePath = dtPath:Column 1[1];

dtSecond = Open("C:Users\" || thePath || "\file.cvs");

myRandom = char( RandomIntiger(11111111,99999999));

dtSecond &amp;lt;&amp;lt; save("c\users\" || myRandom || ".csv" );

close( dtPath, nosave );
close( dtSecond, nosave );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Since it appears that you have a desire to get into JMP Scripting, you really need to take the time to read the Scripting Guide from the JMP Documentation Library.&amp;nbsp; Your current request is solved using the very basic parts of JSL, all of which is covered in the Scripting Guide.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 02:15:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-open-1st-file-and-analyze-it-then-close-and-open-the-2nd/m-p/279362#M54153</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-07-16T02:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to open 1st file and analyze it, then close and open the 2nd file, etc</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-open-1st-file-and-analyze-it-then-close-and-open-the-2nd/m-p/279380#M54156</link>
      <description>&lt;P&gt;Thanks Jim and suggestions.&lt;/P&gt;&lt;P&gt;I will dig more into the script guide.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 06:29:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-open-1st-file-and-analyze-it-then-close-and-open-the-2nd/m-p/279380#M54156</guid>
      <dc:creator>Stokes</dc:creator>
      <dc:date>2020-07-16T06:29:39Z</dc:date>
    </item>
  </channel>
</rss>

