Select most recent excel file downloaded

Hi everyone!
I want to select the most recent excel file from downloads and update it to Sharepoint. I know how to do that second part, but what path I have to put for selecting that file from downloads?

Thanks! :slight_smile:

Lets assume most recent excel file from downloads - evaluated on the Creation date

new DirectoryInfo("C:\XXXX....").GetFiles("*.xlsx").OrderBy(Function (x) x.CreationTime).Last().FullName

We also can adopt on other criterias if needed

[CheatSheet] - Filesystem APIs - News / Tutorials - UiPath Community Forum

It says itโ€™s not valid.
Sorry, I know Iโ€™m writing something wrong.

you missed the new Keyword at least

What keyword?

Thanks! It works perfectly! :slight_smile: