Using Wait For Download Activity to download in specific folder

Hello, I tried the “Wait for Download” activity and has given the folder path in which I want to use the file. It doesn’t show any progress.

By default, it shows the download folder in the activity, so my question is, is there any scope for using other folder paths or just to MOVE the file after download?

@Anirudh_Tugawe

Wait for download foes not change the path it just monitors the given path for the file you want to download and waits till it completes

Now coming to moving file…you have a move file activity in UiPath which can be used to move the file

Also if the file is being downloaded from browser you can choose ask for location before downloading so that you can key in the location in save as window it downloads there itself

Setting-> downloads-> ask before download

Cheers

1 Like

Thankyou Anil ji, When i was reading document about WAIT FOR DOWNLOAD it said browser the folder .

Untitled.png2

You can read it in “Monitored Folder” i am not getting what exactly it means

Hi @Anirudh_Tugawe ,

Monitored Folder - Refers to the folder path where your file gets downloaded. Either you can pass a variable (which has the downloads folder path) directly or can navigate to the specified folder by clicking on the browse next to the option in the activity.
Monitored Folder is refereing to the System Downloads folder path in the system where you are running = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), “Downloads”)

If you wish to change this path let’s say My file gets downloaded to below path: C:\Users\LENOVO\Documents\TrainingGIG\RPADEVGIG
Then you have to pass this by browsing it or directly by a variable

Hope this clarifies your query.
Note: You should know the folder path where your are downloading the files
Regards,
Geetishree Rao

@Anirudh_Tugawe

Monitored folder is the target folder where you are downloding the file…you need to specify the folder path you want to verify where if the required file is downloded or not

Cheers

Yes, I tried adding the new folder path as Variable and Debug the file but in Locals the value of that variable shows “Null”

![Untitled.png3|690x387](upload://zZoeaYlOcJWIY2fw9wyE9vCGbbr.pn

and it’s taking a lot of time for execution maybe it’s not getting the file and also not throwing any error.

Could you share below details:

  • the screenshot of your activity
  • Download Path
  • and the locals panel.

This is the property panel for wait for download activity

This is the folder path directly browsed from the activity and then saved as variable.

Could you do the below steps and share the screenshot:

  • Just below click - Keep a delay of 10 sec and Use a log activity to log the BankDetails Variable
  • Are you assigning values to the two variables Main_Folder? If so whats the value?

Value Assigned in to “C:\Users\hp\Documents\UiPath\ACTIVE LOANS BotsDNA”

Hi @Anirudh_Tugawe ,
I see for you even the Monitored Folder is empty.
Assign the monitored variable value outside the browser activity.
Enclose the Browser activity with Wait for download or Keep a delay after the click and check.

The value of the BankDetails will be null at first in the click activity.It gets populated when the control moves bk to the wait for download activity:

Plz give a try and let me know

I tried putting that assign outside the browser and still can see the null values for the variable.

@Anirudh_Tugawe debug to the the next activity and the Main_folder will be populated.
And then after click when it goes back to Wait activity The BankDetails will be populated.

In your screenshot the control has reached Assign activity and has not yet assigned the MainFolder.
And if after click you do not have any operation to be performed then could you take that wait activity outside and enclose the browser using it

Yes I debugged further now it shows the value of the main folder variable but when it downloads the file it gets stuck and no further progress and I have to wait or stop the debug. I can see the file gets downloaded but it’s in the default folder not the one which is passing as a variable.

@Anirudh_Tugawe …The file gets downloaded to the default Downloads folder which is the default nature.

For local your system you can change it but when you publish this and the process runs in a VM,we should consider the VM’s location .

What you can do is:

  • Assign Monitored Var = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), “Downloads”)
  • Check for the file there
  • Move the file after download to the desired folder location

Yes That was the ultimate thing :sweat_smile:
anyways thanks for your time and also thanks to @Anil_G for his input too

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.