I have a doubt on how to move a file which is fetched from downloads and sorted to get the latest files among the downloads to the folder where my Uipath robot is working. I am attaching how i fetched from downloads folder and did the sorting by I am struck on moving the file without hard coding the To field. SO the logic I used is I assigned a folder path variable with a value System.Environment.GetEnvironmentVariable(“USERPROFILE”)+“\Downloads”
and then I sorted the latest files and assigned a variable strFileToMove with value
Directory.GetFiles(folder_path,“Patron_Information_Detail_Report*.xlsx”).OrderByDescending(Function(d) New FileInfo(d).CreationTime).First
Now i am struck with Move FIle I need to ge that Patron information Detail.xlsx into the place where my robot is working and I don’t want it to be hardcoded. I can read the path either in a csv as a value pair or need to do something here.