It might sound simple and easy for experts, but I am a beginner . 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.
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.
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) )