I have a process for downloading report from a web terminal. Currently I’m using Wait For Download activity to get the downloaded file and move it to a final directory.
It was working fine, until recently the terminal returns 2 files instead of one (one with 1M data rows, another with some additional rows). As the second file is smaller, it gets downloaded fast and the larger file gets ignored for next step of the process.
Now I need a solution/way around to get both the files and move them to my final directory.
Hello @MdFuadHasan ,
I have a way that will get all the downloaded files.
You should get all the downloaded files before and after the waif for the download activity. This way you will get all the downloaded files and you can remove all the previous files from the array which will leave you only the new files.
p.s. you can use Directory.getfiles(“yourDirectory”) and use an assign activity to keep the files in an array.
That’s a nice idea; but as the larger file takes a while to finish download, if I use Directory.getfiles after Wait For Download, don’t you think there’s a chance that the larger file won’t be available at that time?
cause, Wait For Download ends after the smaller file is downloaded, and I have no other way to track the other file.
In that case, I have another idea!!
How about you write the expected directory path each time you download a file. For this you have to go to settings and then select downloads. Then enable “Ask where to save each file before downloading”.
This way computer will ask everytime if downloads a file for a Directory path. Bot will thus download the file without using wait for download activity or more file activity.