# Recursive Loop File Import with Joiner Help

**URL:** <https://forum.knime.com/t/recursive-loop-file-import-with-joiner-help/76520>\
**Category:** KNIME Analytics Platform\
**Created:** [January 11, 2024, 10:51pm UTC](https://forum.knime.com/t/recursive-loop-file-import-with-joiner-help/76520 "2024-01-11T22:51:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BSFL89](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/b/ac8455/32.png) [@BSFL89](https://forum.knime.com/u/BSFL89)\
**Post date:** [January 11, 2024, 10:51pm UTC](https://forum.knime.com/t/recursive-loop-file-import-with-joiner-help/76520/1 "2024-01-11T22:51:42Z")

</div>

Hey everyone, spent a few hours searching/trying different things and found something but close but it was an image and couldn’t quite get it to work. I tried to rebuild what they did as thats basically what I want to do but I think I am getting messed up with the flow variable from the loop start to the row filter.

Basically I have a weekly inventory file, that I want to save the most recent week in a folder, rerun the script and it loads all the data into one file. One thing to note, there may be new skus based on the week so I want to join based off the newest file. I also ideally would love to take the date based on the file name and save the column as the date name, but haven’t played with that yet.

Any help would be much appreciated! I attached what I built so far, as well as some dummy inventory files to test.

> [@Workflow - Join and append columns from different files in loop - Help](https://forum.knime.com/t/workflow-join-and-append-columns-from-different-files-in-loop-help/21388):
>
> Hi there, i am sure there is a more easy way to accomplish the workflow that i created: As you can see i would like to join and append within a starting file a specific column from each excel files in a loop. Is there anyone that can help me please? Thanks

[Test 1.knwf](https://forum.knime.com/uploads/short-url/8FjCcHz7arzPYeVJCi4e1rtERLO.knwf) (111.0 KB)

[Test 2 11.1.23.xlsx](https://forum.knime.com/uploads/short-url/yWvyAux8ODMrdD12HVHcIozUpd2.xlsx) (11.5 KB)  
[Test 3 12.1.23.xlsx](https://forum.knime.com/uploads/short-url/tJVMQcn0ggmNoia9sKWtxGPj8TT.xlsx) (11.5 KB)  
[Test 1 10.1.23.xlsx](https://forum.knime.com/uploads/short-url/ttCanQELT7MZXPLEbhEl8CkYTnv.xlsx) (11.5 KB)

---

<div class="post-metadata">

**Author:** ![BSFL89](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/b/ac8455/32.png) [@BSFL89](https://forum.knime.com/u/BSFL89)\
**Post date:** [January 11, 2024, 10:59pm UTC](https://forum.knime.com/t/recursive-loop-file-import-with-joiner-help/76520/2 "2024-01-11T22:59:21Z")

</div>

![image](https://forum-cdn.knime.com/uploads/default/original/3X/f/8/f8dc4988926aad11e63a329e25eede1ccdfa4986.png)

This is the ideal result, with the item and description and the inventory quantity from each file pulled in. Eventually I will replace missing values with 0’s or do something with them. And the column name is the date name from the file.

---

<div class="post-metadata">

**Author:** ![takbb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/takbb/32/57077_2.png) [@takbb](https://forum.knime.com/u/takbb)\
**Post date:** [January 12, 2024, 1:13am UTC](https://forum.knime.com/t/recursive-loop-file-import-with-joiner-help/76520/3 "2024-01-12T01:13:54Z")

</div>

Hi @BSFL89 , you don’t need a recursive loop for this task. It can be done with a row to variable loop, looping on each path from the List Files/Folders, reading in the files, grabbing the file date from the path and then after the loop completes, pivoting to tabulate the data

[Test 1 v2.knwf](https://forum.knime.com/uploads/short-url/vCeO5Jafh3VsMMpJwcTp2Ehr6C6.knwf) (195.2 KB)

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/c/2/c2c4f6379b358c6d8647f29bab104fac5c258304.png)

I’ve configured List Files/Folders to pick up the files from the workflow’s data folder, so obviously you’ll want to set that back to your original location

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [April 11, 2024, 1:14am UTC](https://forum.knime.com/t/recursive-loop-file-import-with-joiner-help/76520/4 "2024-04-11T01:14:24Z")

</div>

Closed on April 11, 2024, 1:14am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
