<?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 Using MFI across for multiple folders in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Using-MFI-across-for-multiple-folders/m-p/397171#M64788</link>
    <description>&lt;P&gt;Hi, I'm trying to concatenate files using MFI but across different folders in the same main path but due to the massive number of files in the main path, I would like to direct it to specific folders using user input. However, it seems like MFI is only able to select a single folder as the path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another workaround I was thinking of is to search and copy the files with specific keywords in the file name to a new folder and then work from there, not sure if this way is faster and if there's a way to script this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks~&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 19:51:17 GMT</pubDate>
    <dc:creator>deliaaa</dc:creator>
    <dc:date>2023-06-09T19:51:17Z</dc:date>
    <item>
      <title>Using MFI across for multiple folders</title>
      <link>https://community.jmp.com/t5/Discussions/Using-MFI-across-for-multiple-folders/m-p/397171#M64788</link>
      <description>&lt;P&gt;Hi, I'm trying to concatenate files using MFI but across different folders in the same main path but due to the massive number of files in the main path, I would like to direct it to specific folders using user input. However, it seems like MFI is only able to select a single folder as the path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another workaround I was thinking of is to search and copy the files with specific keywords in the file name to a new folder and then work from there, not sure if this way is faster and if there's a way to script this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks~&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:51:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-MFI-across-for-multiple-folders/m-p/397171#M64788</guid>
      <dc:creator>deliaaa</dc:creator>
      <dc:date>2023-06-09T19:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using MFI across for multiple folders</title>
      <link>https://community.jmp.com/t5/Discussions/Using-MFI-across-for-multiple-folders/m-p/397181#M64789</link>
      <description>&lt;P&gt;MFI uses a single starting point. Specifying multiple starting points would be a good Wish List item.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the recursive option from a folder that contains all of the interesting folders, and a file name pattern with the keywords, should be about as fast as other tools that could find the files and move them to a common folder. I've seen it gather one million (short) files in a few minutes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are dealing with much more than a million files in the recursive folders, and only have a few (5?) directories you care about, you could always do 5 separate MFIs, then stack those results using JMP's table stack operation.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 15:48:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-MFI-across-for-multiple-folders/m-p/397181#M64789</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2021-06-30T15:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using MFI across for multiple folders</title>
      <link>https://community.jmp.com/t5/Discussions/Using-MFI-across-for-multiple-folders/m-p/397218#M64791</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt;&amp;nbsp; for the prompt reply! If you happen to have&amp;nbsp;a&amp;nbsp;sample script or can direct me to some resources for this method that you have suggested that would help me a lot! Appreciate!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"recursive option from a folder that contains all of the interesting folders, and a file name pattern with the keywords"&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 16:28:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-MFI-across-for-multiple-folders/m-p/397218#M64791</guid>
      <dc:creator>deliaaa</dc:creator>
      <dc:date>2021-06-30T16:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using MFI across for multiple folders</title>
      <link>https://community.jmp.com/t5/Discussions/Using-MFI-across-for-multiple-folders/m-p/397313#M64800</link>
      <description>&lt;P&gt;Instead of &lt;EM&gt;recursive&lt;/EM&gt; I should have said &lt;EM&gt;Include subfolders&lt;/EM&gt;. Check the box to get the filter for filenames. The size and time filters can also be used, one or more together. At the right you can see how many files remain. Below I'm using .gif rather than .csv because I found a bunch of old ones in a folder tree.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="wild cards: * matches 0 or more and ? matches exactly one." style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33908i070E590030B33E12/image-size/large?v=v2&amp;amp;px=999" role="button" title="capture1.png" alt="wild cards: * matches 0 or more and ? matches exactly one." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;wild cards: * matches 0 or more and ? matches exactly one.&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 23:20:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-MFI-across-for-multiple-folders/m-p/397313#M64800</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2021-06-30T23:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using MFI across for multiple folders</title>
      <link>https://community.jmp.com/t5/Discussions/Using-MFI-across-for-multiple-folders/m-p/397371#M64811</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Multiple File Import(
	&amp;lt;&amp;lt;Set Folder( "\\fsftp1\ftp\"||tool1_input||"\reports" ),
	&amp;lt;&amp;lt;Set Show Hidden( 0 ),
	&amp;lt;&amp;lt;Set Subfolders( 0 ),
	&amp;lt;&amp;lt;Set Name Filter( num_input ||"*EB*.CST" ),
	&amp;lt;&amp;lt;Set Name Enable( 1 ),
	&amp;lt;&amp;lt;Set Size Filter( {14753758, 16813862} ),
	&amp;lt;&amp;lt;Set Size Enable( 0 ),
	&amp;lt;&amp;lt;Set Date Filter( {3702288653.475, 3702734626.833} ),
	&amp;lt;&amp;lt;Set Date Enable( 0 ),
	&amp;lt;&amp;lt;Set Add File Name Column( 1 ),
	&amp;lt;&amp;lt;Set Add File Size Column( 0 ),
	&amp;lt;&amp;lt;Set Add File Date Column( 1 ),
	&amp;lt;&amp;lt;Set Import Mode( "CSVData" ),
	&amp;lt;&amp;lt;Set Charset( "Best Guess" ),
	&amp;lt;&amp;lt;Set Stack Mode( "Stack Similar" ),
	&amp;lt;&amp;lt;Set CSV Has Headers( 1 ),
	&amp;lt;&amp;lt;Set CSV Allow Numeric( 1 ),
	&amp;lt;&amp;lt;Set CSV First Header Line( 15 ),
	&amp;lt;&amp;lt;Set CSV Number Of Header Lines( 1 ),
	&amp;lt;&amp;lt;Set CSV First Data Line( 16 ),
	&amp;lt;&amp;lt;Set CSV EOF Comma( 0 ),
	&amp;lt;&amp;lt;Set CSV EOF Tab( 0 ),
	&amp;lt;&amp;lt;Set CSV EOF Space( 1 ),
	&amp;lt;&amp;lt;Set CSV EOF Spaces( 1 ),
	&amp;lt;&amp;lt;Set CSV EOF Other( "" ),
	&amp;lt;&amp;lt;Set CSV EOL CRLF( 1 ),
	&amp;lt;&amp;lt;Set CSV EOL CR( 1 ),
	&amp;lt;&amp;lt;Set CSV EOL LF( 1 ),
	&amp;lt;&amp;lt;Set CSV EOL Semicolon( 0 ),
	&amp;lt;&amp;lt;Set CSV EOL Other( "" ),
	&amp;lt;&amp;lt;Set CSV Quote( "\!"" ),
	&amp;lt;&amp;lt;Set CSV Escape( "" ),
) &amp;lt;&amp;lt; Import Data;
DT1 = current data table();
DT1 &amp;lt;&amp;lt; set name("file1");

Multiple File Import(
	&amp;lt;&amp;lt;Set Folder( "\\fsftp1\ftp\"||tool2_input||"\reports" ),
	&amp;lt;&amp;lt;Set Show Hidden( 0 ),
	&amp;lt;&amp;lt;Set Subfolders( 0 ),
	&amp;lt;&amp;lt;Set Name Filter( num_input ||"*EB*.CST" ),
	&amp;lt;&amp;lt;Set Name Enable( 1 ),
	&amp;lt;&amp;lt;Set Size Filter( {14753758, 16813862} ),
	&amp;lt;&amp;lt;Set Size Enable( 0 ),
	&amp;lt;&amp;lt;Set Date Filter( {3702288653.475, 3702734626.833} ),
	&amp;lt;&amp;lt;Set Date Enable( 0 ),
	&amp;lt;&amp;lt;Set Add File Name Column( 1 ),
	&amp;lt;&amp;lt;Set Add File Size Column( 0 ),
	&amp;lt;&amp;lt;Set Add File Date Column( 1 ),
	&amp;lt;&amp;lt;Set Import Mode( "CSVData" ),
	&amp;lt;&amp;lt;Set Charset( "Best Guess" ),
	&amp;lt;&amp;lt;Set Stack Mode( "Stack Similar" ),
	&amp;lt;&amp;lt;Set CSV Has Headers( 1 ),
	&amp;lt;&amp;lt;Set CSV Allow Numeric( 1 ),
	&amp;lt;&amp;lt;Set CSV First Header Line( 15 ),
	&amp;lt;&amp;lt;Set CSV Number Of Header Lines( 1 ),
	&amp;lt;&amp;lt;Set CSV First Data Line( 16 ),
	&amp;lt;&amp;lt;Set CSV EOF Comma( 0 ),
	&amp;lt;&amp;lt;Set CSV EOF Tab( 0 ),
	&amp;lt;&amp;lt;Set CSV EOF Space( 1 ),
	&amp;lt;&amp;lt;Set CSV EOF Spaces( 1 ),
	&amp;lt;&amp;lt;Set CSV EOF Other( "" ),
	&amp;lt;&amp;lt;Set CSV EOL CRLF( 1 ),
	&amp;lt;&amp;lt;Set CSV EOL CR( 1 ),
	&amp;lt;&amp;lt;Set CSV EOL LF( 1 ),
	&amp;lt;&amp;lt;Set CSV EOL Semicolon( 0 ),
	&amp;lt;&amp;lt;Set CSV EOL Other( "" ),
	&amp;lt;&amp;lt;Set CSV Quote( "\!"" ),
	&amp;lt;&amp;lt;Set CSV Escape( "" ),
) &amp;lt;&amp;lt; Import Data;
DT2 = current data table();
DT2 &amp;lt;&amp;lt; set name("file2");

Data Table( "file1" ) &amp;lt;&amp;lt;
Concatenate(
	Data Table( "file2" ),
	Output Table( "Final" ),
	Create source column
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;As my directory has too many files, it was taking way too long (more than 30min&amp;nbsp;and it's not yet done with the "Discovering files" portion, so I have decided to use the option to trigger multiple times of MFI and then concatenate. But I noticed it run the "Discovering files" (3?)times before outputting the 'file1' and another (3?)times before outing 'file2'. Ultimately it did give me file1 and file2 then concatenate into "Final", but was taking longer than it&amp;nbsp;should.&amp;nbsp;&amp;nbsp;I tried to remove the second MFI and it works fine, was able to output the file1 in within 2min. Below is my script, do you know what went wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 09:47:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-MFI-across-for-multiple-folders/m-p/397371#M64811</guid>
      <dc:creator>deliaaa</dc:creator>
      <dc:date>2021-07-01T09:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using MFI across for multiple folders</title>
      <link>https://community.jmp.com/t5/Discussions/Using-MFI-across-for-multiple-folders/m-p/397446#M64818</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As my directory has too many files, it was taking way too long (more than 30min and it's not yet done with the "Discovering files" portion, so I have decided to use the option to trigger multiple times of MFI and then concatenate. But I noticed it run the "Discovering files" (3?)times before outputting the 'file1' and another (3?)times before outing 'file2'. Ultimately it did give me file1 and file2 then concatenate into "Final", but was taking longer than it should.&amp;nbsp; I tried to remove the second MFI and it works fine, was able to output the file1 in within 2min. Below is my script, do you know what went wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Multiple File Import(
	&amp;lt;&amp;lt;Set Folder( "\\fsftp1\ftp\"||tool1_input||"\reports" ),
	&amp;lt;&amp;lt;Set Show Hidden( 0 ),
	&amp;lt;&amp;lt;Set Subfolders( 0 ),
	&amp;lt;&amp;lt;Set Name Filter( num_input ||"*EB*.CST" ),
	&amp;lt;&amp;lt;Set Name Enable( 1 ),
	&amp;lt;&amp;lt;Set Size Filter( {14753758, 16813862} ),
	&amp;lt;&amp;lt;Set Size Enable( 0 ),
	&amp;lt;&amp;lt;Set Date Filter( {3702288653.475, 3702734626.833} ),
	&amp;lt;&amp;lt;Set Date Enable( 0 ),
	&amp;lt;&amp;lt;Set Add File Name Column( 1 ),
	&amp;lt;&amp;lt;Set Add File Size Column( 0 ),
	&amp;lt;&amp;lt;Set Add File Date Column( 1 ),
	&amp;lt;&amp;lt;Set Import Mode( "CSVData" ),
	&amp;lt;&amp;lt;Set Charset( "Best Guess" ),
	&amp;lt;&amp;lt;Set Stack Mode( "Stack Similar" ),
	&amp;lt;&amp;lt;Set CSV Has Headers( 1 ),
	&amp;lt;&amp;lt;Set CSV Allow Numeric( 1 ),
	&amp;lt;&amp;lt;Set CSV First Header Line( 15 ),
	&amp;lt;&amp;lt;Set CSV Number Of Header Lines( 1 ),
	&amp;lt;&amp;lt;Set CSV First Data Line( 16 ),
	&amp;lt;&amp;lt;Set CSV EOF Comma( 0 ),
	&amp;lt;&amp;lt;Set CSV EOF Tab( 0 ),
	&amp;lt;&amp;lt;Set CSV EOF Space( 1 ),
	&amp;lt;&amp;lt;Set CSV EOF Spaces( 1 ),
	&amp;lt;&amp;lt;Set CSV EOF Other( "" ),
	&amp;lt;&amp;lt;Set CSV EOL CRLF( 1 ),
	&amp;lt;&amp;lt;Set CSV EOL CR( 1 ),
	&amp;lt;&amp;lt;Set CSV EOL LF( 1 ),
	&amp;lt;&amp;lt;Set CSV EOL Semicolon( 0 ),
	&amp;lt;&amp;lt;Set CSV EOL Other( "" ),
	&amp;lt;&amp;lt;Set CSV Quote( "\!"" ),
	&amp;lt;&amp;lt;Set CSV Escape( "" ),
) &amp;lt;&amp;lt; Import Data;
DT1 = current data table();
DT1 &amp;lt;&amp;lt; set name("file1");

Multiple File Import(
	&amp;lt;&amp;lt;Set Folder( "\\fsftp1\ftp\"||tool2_input||"\reports" ),
	&amp;lt;&amp;lt;Set Show Hidden( 0 ),
	&amp;lt;&amp;lt;Set Subfolders( 0 ),
	&amp;lt;&amp;lt;Set Name Filter( num_input ||"*EB*.CST" ),
	&amp;lt;&amp;lt;Set Name Enable( 1 ),
	&amp;lt;&amp;lt;Set Size Filter( {14753758, 16813862} ),
	&amp;lt;&amp;lt;Set Size Enable( 0 ),
	&amp;lt;&amp;lt;Set Date Filter( {3702288653.475, 3702734626.833} ),
	&amp;lt;&amp;lt;Set Date Enable( 0 ),
	&amp;lt;&amp;lt;Set Add File Name Column( 1 ),
	&amp;lt;&amp;lt;Set Add File Size Column( 0 ),
	&amp;lt;&amp;lt;Set Add File Date Column( 1 ),
	&amp;lt;&amp;lt;Set Import Mode( "CSVData" ),
	&amp;lt;&amp;lt;Set Charset( "Best Guess" ),
	&amp;lt;&amp;lt;Set Stack Mode( "Stack Similar" ),
	&amp;lt;&amp;lt;Set CSV Has Headers( 1 ),
	&amp;lt;&amp;lt;Set CSV Allow Numeric( 1 ),
	&amp;lt;&amp;lt;Set CSV First Header Line( 15 ),
	&amp;lt;&amp;lt;Set CSV Number Of Header Lines( 1 ),
	&amp;lt;&amp;lt;Set CSV First Data Line( 16 ),
	&amp;lt;&amp;lt;Set CSV EOF Comma( 0 ),
	&amp;lt;&amp;lt;Set CSV EOF Tab( 0 ),
	&amp;lt;&amp;lt;Set CSV EOF Space( 1 ),
	&amp;lt;&amp;lt;Set CSV EOF Spaces( 1 ),
	&amp;lt;&amp;lt;Set CSV EOF Other( "" ),
	&amp;lt;&amp;lt;Set CSV EOL CRLF( 1 ),
	&amp;lt;&amp;lt;Set CSV EOL CR( 1 ),
	&amp;lt;&amp;lt;Set CSV EOL LF( 1 ),
	&amp;lt;&amp;lt;Set CSV EOL Semicolon( 0 ),
	&amp;lt;&amp;lt;Set CSV EOL Other( "" ),
	&amp;lt;&amp;lt;Set CSV Quote( "\!"" ),
	&amp;lt;&amp;lt;Set CSV Escape( "" ),
) &amp;lt;&amp;lt; Import Data;
DT2 = current data table();
DT2 &amp;lt;&amp;lt; set name("file2");

Data Table( "file1" ) &amp;lt;&amp;lt;
Concatenate(
	Data Table( "file2" ),
	Output Table( "Final" ),
	Create source column
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Jul 2021 09:49:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-MFI-across-for-multiple-folders/m-p/397446#M64818</guid>
      <dc:creator>deliaaa</dc:creator>
      <dc:date>2021-07-01T09:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using MFI across for multiple folders</title>
      <link>https://community.jmp.com/t5/Discussions/Using-MFI-across-for-multiple-folders/m-p/398083#M64882</link>
      <description>&lt;P&gt;Hi, sorry, just saw this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think there are about three progress indicators if it takes long enough. One of them is for the file discovery phase, one of them is for collecting the file attributes (size, date), and one of them is for reading the files. If you are seeing three with the same &lt;EM&gt;file discovery&lt;/EM&gt; title, something else is going on.&lt;/P&gt;&lt;P&gt;When you run it from a script (nice job on building the path!) then you can see all three of the progress indicators and some of them might be brief or not shown.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You might want to use something like this rather than current data table():&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dtList = MultipleFileImport(...)&amp;lt;&amp;lt;ImportData;
if( nitems(dtList) != 1, throw("unexpected tables returned from MFI") );
DT1 = dtList[1];
DT1&amp;lt;&amp;lt;setname(...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;MFI's ImportData method returns a list of tables, and you are hoping for exactly one because you expect all of the files to stack. If anything goes wrong, the if( ..., throw(...) ) will help you identify the problem. Using current data table works if nothing goes wrong. dtList[1] is the first and only item in the list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 22:13:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-MFI-across-for-multiple-folders/m-p/398083#M64882</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2021-07-02T22:13:46Z</dc:date>
    </item>
  </channel>
</rss>

