Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Choose the input files automatically every day

howyoudoing
7 - Meteor

Could you please help me how to choose the 2 files automatically in the input which are generated every day?

 

 I have 1 file which is generated every day called Price_1Oct.xlsx, Price_2Oct.xlsx depends which day it is and the second file depend on month like SuppliersAugust.xlsx, SuppliersSeptember.xlsx. The 2 files are in one folder and I would like to download them automatically to my workflow not to manually choose them day by day. Could you please help?

 

 

4 REPLIES 4
OTrieger
12 - Quasar

@howyoudoing 
If they files are always saved into the save folder you can use a directory tool, but you must ensure that only these 2 files will be in that folder.

howyoudoing
7 - Meteor

in this filder I have all files updated by the date like for example: Price1Sep, Price2Sep, Price3Sep... do you know how it can be done to choose the more updated file automatically? what filter should be or what?

OTrieger
12 - Quasar

@howyoudoing 
Yes, you could do that, as the Directory tool will give you the creation time of the file, it will actually give you there 3 or 4 different dates, you be able to sort them out most recent and then select the first file with Sample tool. You can do it with several different tools in different ways. So this is just one option on how to do it.
Just split the Price items and Supplier items and do the same and you will have the most recent file.

OllieClarke
15 - Aurora
15 - Aurora

@howyoudoing you can use a directory input tool to load in the information about all the files in the folder.

 

You can then filter those files based on their name, and the current date which we can format using datetimeformat()

 

image.png

This approach assumes that there aren't multiple years worth of files in the directory

 

Hope that helps,

 

Ollie

Labels