<?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: Concatenating large number of files in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/1537#M1537</link>
    <description>See:&lt;BR /&gt;Jump into JMP Scripting &lt;BR /&gt;By: Wendy Murphrey and Rosemary Lucas &lt;BR /&gt;// http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&amp;amp;pc=61733&lt;BR /&gt;Page 122, Soultion 5.16&lt;BR /&gt;&lt;BR /&gt;Set Current Directory( "C:\temp2" );&lt;BR /&gt;myFiles = Files In Directory( "C:\temp2" );&lt;BR /&gt;For( i = 1, i &amp;lt;= N Items( myFiles ), i++,      &lt;BR /&gt;/* If the file is the first in the list, open it. Otherwise, open the table, concatenate with the main table, and close the table just opened. */&lt;BR /&gt;    If( i == 1,&lt;BR /&gt;        mainDt = Open( "C:\temp2\" || myFiles&lt;I&gt; ),&lt;BR /&gt;        dt = Open( "C:\temp2\" || myFiles&lt;I&gt; );&lt;BR /&gt;        mainDt = mainDt &amp;lt;&amp;lt; Concatenate( dt, Append to First Table );&lt;BR /&gt;        Close( dt, NoSave );&lt;BR /&gt;        Wait( 0 );&lt;BR /&gt;    )&lt;BR /&gt;  );    &lt;BR /&gt;/* Give the final table a name. */&lt;BR /&gt;mainDt &amp;lt;&amp;lt; Set Name( "Concatenated Files" );&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;-Matt&lt;/I&gt;&lt;/I&gt;</description>
    <pubDate>Mon, 22 Mar 2010 19:51:34 GMT</pubDate>
    <dc:creator>mattf</dc:creator>
    <dc:date>2010-03-22T19:51:34Z</dc:date>
    <item>
      <title>Concatenating large number of files</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/1536#M1536</link>
      <description>Hi Guys,&lt;BR /&gt;&lt;BR /&gt;I am trying to concatenate several files in a folder as below:&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Mar 2010 17:12:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/1536#M1536</guid>
      <dc:creator />
      <dc:date>2010-03-22T17:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating large number of files</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/1537#M1537</link>
      <description>See:&lt;BR /&gt;Jump into JMP Scripting &lt;BR /&gt;By: Wendy Murphrey and Rosemary Lucas &lt;BR /&gt;// http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&amp;amp;pc=61733&lt;BR /&gt;Page 122, Soultion 5.16&lt;BR /&gt;&lt;BR /&gt;Set Current Directory( "C:\temp2" );&lt;BR /&gt;myFiles = Files In Directory( "C:\temp2" );&lt;BR /&gt;For( i = 1, i &amp;lt;= N Items( myFiles ), i++,      &lt;BR /&gt;/* If the file is the first in the list, open it. Otherwise, open the table, concatenate with the main table, and close the table just opened. */&lt;BR /&gt;    If( i == 1,&lt;BR /&gt;        mainDt = Open( "C:\temp2\" || myFiles&lt;I&gt; ),&lt;BR /&gt;        dt = Open( "C:\temp2\" || myFiles&lt;I&gt; );&lt;BR /&gt;        mainDt = mainDt &amp;lt;&amp;lt; Concatenate( dt, Append to First Table );&lt;BR /&gt;        Close( dt, NoSave );&lt;BR /&gt;        Wait( 0 );&lt;BR /&gt;    )&lt;BR /&gt;  );    &lt;BR /&gt;/* Give the final table a name. */&lt;BR /&gt;mainDt &amp;lt;&amp;lt; Set Name( "Concatenated Files" );&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;-Matt&lt;/I&gt;&lt;/I&gt;</description>
      <pubDate>Mon, 22 Mar 2010 19:51:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/1537#M1537</guid>
      <dc:creator>mattf</dc:creator>
      <dc:date>2010-03-22T19:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating large number of files</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/1538#M1538</link>
      <description>See:&lt;BR /&gt;Jump into JMP Scripting &lt;BR /&gt;By: Wendy Murphrey and Rosemary Lucas &lt;BR /&gt;// http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&amp;amp;pc=61733&lt;BR /&gt;Page 122, Soultion 5.16&lt;BR /&gt;&lt;BR /&gt;Set Current Directory( "C:\temp2" );&lt;BR /&gt;myFiles = Files In Directory( "C:\temp2" );&lt;BR /&gt;For( i = 1, i &amp;lt;= N Items( myFiles ), i++,      &lt;BR /&gt;/* If the file is the first in the list, open it. Otherwise, open the table, concatenate with the main table, and close the table just opened. */&lt;BR /&gt;    If( i == 1,&lt;BR /&gt;        mainDt = Open( "C:\temp2\" || myFiles&lt;I&gt; ),&lt;BR /&gt;        dt = Open( "C:\temp2\" || myFiles&lt;I&gt; );&lt;BR /&gt;        mainDt = mainDt &amp;lt;&amp;lt; Concatenate( dt, Append to First Table );&lt;BR /&gt;        Close( dt, NoSave );&lt;BR /&gt;        Wait( 0 );&lt;BR /&gt;    )&lt;BR /&gt;  );    &lt;BR /&gt;/* Give the final table a name. */&lt;BR /&gt;mainDt &amp;lt;&amp;lt; Set Name( "Concatenated Files" );&lt;/I&gt;&lt;/I&gt;</description>
      <pubDate>Mon, 22 Mar 2010 19:53:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/1538#M1538</guid>
      <dc:creator>mattf</dc:creator>
      <dc:date>2010-03-22T19:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating large number of files</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/1539#M1539</link>
      <description>Thanks. Can you please use the following to post your code?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Mar 2010 20:38:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/1539#M1539</guid>
      <dc:creator />
      <dc:date>2010-03-22T20:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating large number of files</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/1540#M1540</link>
      <description>You may find this trick useful:&lt;BR /&gt;&lt;BR /&gt;After logging in, "reply" to the posting and "Quote Original". You will the have the complete code which you can copy / paste into a JMP script window. Then remove the first 2 characters on each line ("&amp;gt; ") to get the code as it was intended. Then cancel the reply.</description>
      <pubDate>Mon, 22 Mar 2010 22:46:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/1540#M1540</guid>
      <dc:creator>mpb</dc:creator>
      <dc:date>2010-03-22T22:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating large number of files</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/1541#M1541</link>
      <description>Thanks Matt, that worked. I will take a look at the book. &lt;BR /&gt;&lt;BR /&gt;Thanks, mpb for the tip.</description>
      <pubDate>Mon, 22 Mar 2010 23:33:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/1541#M1541</guid>
      <dc:creator />
      <dc:date>2010-03-22T23:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating large number of files</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/1542#M1542</link>
      <description />
      <pubDate>Tue, 23 Mar 2010 13:21:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/1542#M1542</guid>
      <dc:creator>mattf</dc:creator>
      <dc:date>2010-03-23T13:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating large number of files</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/1543#M1543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I made a variation of that code that incorporates the Source table name for each file. In this case it takes all the txt files but you can also do it with csv or other format.&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1343221820089728" jivemacro_uid="_1343221820089728"&gt;&lt;BR /&gt;&lt;P class="p1"&gt;mypath &lt;SPAN class="s1"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;"C:\temp\"&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P class="p2"&gt;Set Current Directory&lt;SPAN class="s3"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; mypath &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;y &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s3"&gt; &lt;/SPAN&gt;Files In Directory&lt;SPAN class="s3"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; mypath &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;&lt;SPAN class="s4"&gt;For&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; i &lt;SPAN class="s1"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s4"&gt;N Items&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; y &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;,&lt;/SPAN&gt; i &lt;SPAN class="s1"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="s5"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;,&lt;/SPAN&gt; i&lt;SPAN class="s1"&gt;--,&lt;/SPAN&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;&amp;nbsp; &lt;SPAN class="s4"&gt;If&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN class="s4"&gt;Ends With&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; y&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;,&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;"txt"&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;,&lt;/SPAN&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;&amp;nbsp; &lt;SPAN class="s1"&gt;,&lt;/SPAN&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;&amp;nbsp; &lt;SPAN class="s4"&gt;Remove From&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; y&lt;SPAN class="s1"&gt;,&lt;/SPAN&gt; i &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;n &lt;SPAN class="s1"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s4"&gt;N Items&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; y &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;&lt;SPAN class="s4"&gt;For&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; i &lt;SPAN class="s1"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s5"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;,&lt;/SPAN&gt; i &lt;SPAN class="s1"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN class="s4"&gt;N Items&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; y &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;,&lt;/SPAN&gt; i&lt;SPAN class="s1"&gt;++,&lt;/SPAN&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;&amp;nbsp; sname&lt;SPAN class="s1"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;left&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;y&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;,&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;length&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;y&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;])&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;-&lt;/SPAN&gt;&lt;SPAN class="s5"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p3"&gt;/* If the file is the first in the list, open it. Otherwise, open the table, concatenate with the main table, and close the table just opened. */&lt;SPAN class="s3"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="s4"&gt;If&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; i &lt;SPAN class="s1"&gt;==&lt;/SPAN&gt; &lt;SPAN class="s5"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;,&lt;/SPAN&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mainDt &lt;SPAN class="s1"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s4"&gt;Open&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; mypath &lt;SPAN class="s1"&gt;||&lt;/SPAN&gt; y&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mainDt &lt;SPAN class="s1"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN class="s4"&gt;New Column&lt;/SPAN&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN class="s2"&gt;"source"&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;,&lt;/SPAN&gt; character&lt;SPAN class="s1"&gt;,&lt;/SPAN&gt; set each value &lt;STRONG&gt;(&lt;/STRONG&gt; sname &lt;STRONG&gt;))&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;,&lt;/SPAN&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dt &lt;SPAN class="s1"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s4"&gt;Open&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; mypath &lt;SPAN class="s1"&gt;||&lt;/SPAN&gt; y&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN class="s1"&gt;;&lt;/SPAN&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dt &lt;SPAN class="s1"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN class="s4"&gt;New Column&lt;/SPAN&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN class="s2"&gt;"source"&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;,&lt;/SPAN&gt; character&lt;SPAN class="s1"&gt;,&lt;/SPAN&gt; set each value &lt;STRONG&gt;(&lt;/STRONG&gt; sname &lt;STRONG&gt;))&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mainDt &lt;SPAN class="s1"&gt;=&lt;/SPAN&gt; mainDt &lt;SPAN class="s1"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; Concatenate&lt;STRONG&gt;(&lt;/STRONG&gt; dt&lt;SPAN class="s1"&gt;,&lt;/SPAN&gt; Append to First Table &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="s4"&gt;Close&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; dt&lt;SPAN class="s1"&gt;,&lt;/SPAN&gt; NoSave &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="s4"&gt;Wait&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN class="s5"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p3"&gt;/* Give the final table a name. */&lt;SPAN class="s3"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;mainDt&lt;SPAN class="s1"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; Set Name&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN class="s2"&gt;"Concatenated Files"&lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2012 13:13:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/1543#M1543</guid>
      <dc:creator>jorgeramosdealm</dc:creator>
      <dc:date>2012-07-25T13:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating large number of files</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/254206#M49905</link>
      <description>&lt;P&gt;I am hoping to find out where I am going wrong with this one.&amp;nbsp; The debugger won't start but I have about 20,000 files, could that be the problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Set Current Directory( mypath );  


y = Files In Directory( mypath );  


For( i = N Items( y ), i &amp;gt; 0, i--, 


  If( Ends With( y[i], "csv" ), 


  , 


  Remove From( y, i ) 


  ) 


); 


n = N Items( y ); 


For( i = 1, i &amp;lt;= N Items( y ), i++, 


  sname=left(y[i],length(y[i])-4); 


/* If the file is the first in the list, open it. Otherwise, open the table, concatenate with the main table, and close the table just opened. */  


    If( i == 1, 


        mainDt = Open( mypath || y[i] ); 


        mainDt &amp;lt;&amp;lt; New Column ("source", character, set each value ( sname )), 


        dt = Open( mypath || y[i] ) ; 


        dt &amp;lt;&amp;lt; New Column ("source", character, set each value ( sname )); 


        mainDt = mainDt &amp;lt;&amp;lt; Concatenate( dt, Append to First Table ); 


        Close( dt, NoSave ); 


        Wait( 0 ); 


    ) 


  );    


/* Give the final table a name. */  


mainDt&amp;lt;&amp;lt; Set Name("Terminal");&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Mar 2020 14:16:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/254206#M49905</guid>
      <dc:creator>mjvincent87</dc:creator>
      <dc:date>2020-03-25T14:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating large number of files</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/254255#M49913</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/13069"&gt;@mjvincent87&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The original post is several years old and some better options exist for importing multiple files from a directory.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you seen the &lt;A title="JMP: Multiple File Import ( MFI )" href="https://www.jmp.com/support/help/en/15.0/index.shtml#page/jmp/import-multiple-files.shtml" target="_self"&gt;multiple file import &lt;/A&gt;that was introduced in JMP 14?&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;new multiple file import platform launches a dialog to load several files into a single JMP data table. In addition, it allows filtering of files by size, date, name and type and supports one-column import, useful for Text Explorer document preparation. Also the platform offers support for editing text import options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cheers,&lt;/P&gt;
&lt;P&gt;Stan&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 16:12:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/254255#M49913</guid>
      <dc:creator>stan_koprowski</dc:creator>
      <dc:date>2020-03-25T16:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating large number of files</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/254260#M49917</link>
      <description>That sounds great, unfortunately I am using JMP13</description>
      <pubDate>Wed, 25 Mar 2020 16:22:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/254260#M49917</guid>
      <dc:creator>mjvincent87</dc:creator>
      <dc:date>2020-03-25T16:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating large number of files</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/254292#M49922</link>
      <description>&lt;P&gt;There is a JSL error, I think, here&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( Ends With( y[i], "csv" ), 
 0 // need something here, a zero is good enough
, 
  Remove From( y, i ) 
) &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;the two adjacent commas need something between them. A 0 is a very tiny expression that evaluates to 0 and does nothing else. (Or switch the logic around with !EndsWith(...) where ! means NOT.)&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 22:57:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenating-large-number-of-files/m-p/254292#M49922</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2020-03-25T22:57:33Z</dc:date>
    </item>
  </channel>
</rss>

