Hi,
i’m building a logic which has to take the name of the newly downloaded file for future usage, in other automations in UiPath. For this purpouse i wanted to receive at the end of flow the output with the downloaded file name as a variable. To use that i inserted all the logic in the scope of activity ,Wait for Download" and as output i set my variable name. Unfortunately this output variable is in System.IO.FileInfo data type so I cannot use it in next steps of automation like, openinng this file and etc.
Can anyone help me to convert System.IO.FileInfo datatype into String?
Or there’s maybe some other, better solution to get the name or path for newly downloaded file?
May be this example will help you.
You can also customize your file searching pattern like this
Directory.GetFiles(“Your File Path”, “.”, SearchOption.AllDirectories).Where(Function(s) s.EndsWith(“.pdf”) Or s.EndsWith(“.docx”))
Thank you a lot for response anandji05 I’ve already managed with my problem by exeprimenting. So, after I get in output object data of downloaded file (by usage ,Wait for download" acitivity) i use ,Assign" activitiy and asssigned new variable(string) to objectdata.Name
Assign activitiy after ,Wait for download" acitivity: