cancel
Showing results for 
Search instead for 
Did you mean: 

How to Have the File Reader Read the Newest File

lissa_emery
New Contributor

I am building a pipeline that reads from an sftp directory and has a new file posted daily. I can access a file if I hard-code the name, but what is the syntax to get it to pick up the newest file posted each day? Each new file has a unique code number and date appended to the end of the file name. I’ve tried adding a * and * . * but neither seems to pick up the newest file.

Thanks in advance!

1 REPLY 1

christwr
Contributor III

Can maybe start with a directory browser and then use some logic to filter for the one you want to pick up, and pass that in to your file reader.