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

1 Like

It says it’s not valid.
Sorry, I know I’m writing something wrong.

you missed the new Keyword at least

What keyword?

1 Like

Thanks! It works perfectly! :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.