Hi,
I’m downoading a file with name “summary_results_8476234”. The number after the Summary Result keep changes with each time I download it and its a random number. I tried with Do while loop and passing “*” instead of number in path but if file gets download during loop, path exist activity is not able to locate it and code fails. Is there any solution?
@Kedar_Wagh welcome to community
go through it https://docs.uipath.com/activities/docs/get-last-downloaded-file
Hi,
Use Directory.getfiles(PathVariable) - store in string of array variable(temp)
Use For loop with temp and check the item.contains(“summary_results”)
Regards
Rushi
Hello @Kedar_Wagh
One suggestion is to clear all the files in the download folder before to the automation execution or move the existing files to some other backup folder.
Then download the file and use Wait for download activity to wait for the downloading.
Then use _myList = Directory.GetFiles(folderPath,”Summary_results*”,System.IO.SearchOption.AllDirectories)
Hi, Thank you. This worked.
welcome @Kedar_Wagh
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.