1.

How will you get the latest file from a folder in UiPath?

Answer»

The following steps will help you in obtaining the latest file from a folder:

  • Drag the "Assign" activity into the designer PANEL and give it a "Folder Path."
  • Drag the "Message Box" activity into the designer panel and PASTE it into the code below.
String.Join("", Directory.GetFiles(my_Folder_Path,"*",SearchOption.AllDirectories).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Take(1) )


Discussion

No Comment Found