HI Data Folks,
Need your suggestion here on "How to dynamically run and pick up the most recent file in multiple folders".
I have data in different folders, each folder has multiple excel files, i want to pick up the latest file from each folder. How is it possible ?
I read on the community page, found option to use Directory + Sort + Sample + Dynamic Input will help.
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Select-Input-txt-file-based-on-creation-date/td-p/57840
https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/How-to-dynamically-run-the-most-recent-file-in-a-file-folder/ta-p/24204
Yes, if it will if i will pull the data from a folder. While my requirement was to pull the latest created file from each folder.
Have attached my data & Alteryx flow for you to review and suggest how to make it right ?
Please please help!
Mahabir
Hi @Mahabirpanigrahi,
It looks like your workflow was very close.
1. Change the Sort tool to first sort by directory ascending, then by creation time descending.
2. Bring Sample tool in line with rest of workflow and sample first record, then group by directory.
The rest of the workflow looks good.
@T_Willins You are a savior. Thank you thank you.
Sorry just noticed already answered.
In your Sample tool use group by Directory as shown below, to fetch all the required rows.:
@ganesamurthy Sure, will try that. Thanks. Appreciate your help!