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.
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
Solved! Go to Solution.
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!
Hi @Mahabirpanigrahi & @ganesamurthy,
You should only need a batch macro if the format of the files are different. The Dynamic Input, like the regular Input tool, can import multiple files at once into a workflow as long as the files are in the same format. A batch macro is needed if the files have different formats.
I agree with @T_Willins
I realized it soon after I wrote my message hence deleted that from my response.
Thank you @T_Willins & @ganesamurthy .
Another question to follow to this. If you can guide. [Already put it in Community page though].
Suppose Folder A "Latest .xlsx file", I have wrongly kept it open and run the work flow. So as per process the flow will throw me an error, and the data from that Folder A will not be picked thru Alteryx.
So, are there any way Alteryx will pick up the previous updated file ?
Is this something possible in Alteryx ?
Thank you in advance!
Mahabir.
Since that is already listed on this board as a separate post, I will put my answer there.