Click Activity: How to click on to select the latest file on web browser file share

It might sound simple and easy for experts, but I am a beginner :smile: . I want to click to select the latest file in a file shared location (Like SharePoint).

I know we can pass a variable in the selector as parameter, but I am not sure if that could work.

Appreciate if you throw me so light


Welcome to our UiPath community.

Hope latest file always on the top in SharePoint.
Just use Click activity and indicate the first file. You need to tweak the selector of click activity to make sure it’s working for all files.

Hi Esteban vargas Bustos,

To identify the latest file in shared folder use the below syntax,

String.Join(“”,Directory.GetFiles(“YourFolderPath”,”*”,SearchOption.AllDirectories).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Take(1) )

Try this it will work.