Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Picking up the latest file available at the folder where only dates are changing

SudhaGupta1
7 - Meteor

Hi Team,

I want to pick up the latest file from the folder where all files are same just the dates are changing. I tried using the directory tool with wildcard but it is picking all the file. Can someone please guide how to do it?

5 REPLIES 5
Kakuffo
Alteryx
Alteryx

hi @SudhaGupta1  directory tool would be the best you can use the sort tool on the  file/folder created date field to get the leates file in the directory alternatively if you could provide the file naming convention im sure we could parse out the dates and then sort the data that way also to ensure you are only processing the latest file or a file that meets a set conditon

Christina_H
14 - Magnetar

Use the directory tool to bring in details of all files, then sort by date and use a sample tool to select only the latest.

Sarreddy
9 - Comet

My solution.

Sarreddy_0-1663256879044.png

 

SudhaGupta1
7 - Meteor

@Christina_H  Thanks for helping out. It worked.

JJ316
5 - Atom

How do I pull the actual file CONTENTS forward for further processing?  I tried to follow these steps and I'm just left with a dataset showing the filename, creation time, a record ID, and the newly added column of "Record_Status".  I need to have the latest file then opened and further filtered and transformed.

RecordIDFileNameCreationTimeRecord_Status
120230401 example.txt4/1/2023 2:53latest file
220230201 example.txt3/1/2023 13:13old file
320230301 example.txt3/1/2023 13:13old file
420221201 example.txt12/1/2022 3:25old file
520221101 example.txt11/1/2022 8:47old file
Labels