Forum Discussion

lissa_emery's avatar
lissa_emery
New Contributor
7 years ago

How to Have the File Reader Read the Newest File

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

  • christwr's avatar
    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.