Intercept File Downloads

I have a process that goes to a website and clicks a button to download a file. I want to add the data from this file to another file. The problem is that when I click the download button, the file is downloaded with a random string as the name (for example: Xt58Ts55UUUUA4wo8dw1358FTv.xlsx) and the file name is different every time I click the button.

Is there a way for UIPath to intercept the download and rename it to “download.xlsx”?

Depends on the process and your browser. After the download has finished, most browsers will expose the name of the associated file, for example:


You could wait for the text to change to “Completed”, e.g. by using the Text Exists activity, then get the file name with Get Text, open said file & merge Excel, and then finally remove it.

Alternatively, you could get the latest file from the Download folder - still, you would need to know if the download has finished first.

Hi there,

I typically go straight into the download folders path, and have my workflows clean it up before initializing. You could pass all download files into an array as in the example below, and then interact with it with a For Each loop. Note the Path_Downloads is my path as a string variable