Start Free Trial

Alteryx Designer Desktop Discussions

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

Extract last 30 days Files from Folder

Jaganmohan
8 - Asteroid

Hi Team,

Need your support Please! - Need to extract input files from Folder.
Could you please explain how can i extract last 30 days files from specified folder.
Note : need to extract only last 30 working day files from the folder. 

Please find attached sample file names for your reference, Thanks.

 

Jaganmohan_0-1673290134771.png

 

3 REPLIES 3
JamesCharnley
13 - Pulsar

Hi @Jaganmohan 

 

If you point a directory tool at the relevant folder, you'd then be able to use a filter tool with date time now and the Creation Date field (DateTimeDiff(DateTimeNow(),[CreationTime],'day') < 30) to keep the relevant records. Something like this following:

 

JamesCharnley_0-1673290653930.png

 

 

No point me really attaching the workflow since it's just pointed to a random folder on my computer but let me know if you have any questions

Jaganmohan
8 - Asteroid

Thanks for your support - can i get only working 30 days files ( I mean excluding Saturday and Sundays).

JamesCharnley
13 - Pulsar

Hey @Jaganmohan yeah no problem! 

 

Just add another condition to your filter that excludes weekend days. Adding something like this should work:

 

AND
DateTimeFormat([CreationTime],'%A') NOT IN  ('Saturday', 'Sunday')

 

 

Labels
Top Solution Authors