Guide download to a folder

I need to make sure that when I click on Google to download the report, it takes this report that I downloaded and sends it to a specific folder (there are several companies that download the report, so each one has to go to a folder that belongs to their company, I use this one I code for my automation to create company folders
" “C:\PASTA_COMPARTILHAMENTO\RPA” + in_TransactionItem(“CNPJ”).ToString+“-”+in_TransactionItem(“COMPANY”).ToString") I would like to know if there is any tool where I can make the download go to the folder created by code or how do I make it happen

Can you please elaborate more on what happens when you click download ? Are you prompted with a popup in which you specify the file name and destination folder?

If you cannot specify the folder, one option would be to use “Wait for Download” activity, and then move each downloaded file from the Downloads folder to the folder you’re creating for each company.

when I click on download it downloads in a folder in my directory but each file even if it is from the same site comes with a different name and the date of the day comes, so I need that when downloading the file it already goes to the folder that was created for him

Can this be done using Click activities?

Did you try changing your browser settings so that it asks you where to save all downloaded files?

I just put this option thanks, but now I have to do that when I save it, in addition to changing the name, it puts it in the folder where the company is, what tool can I use for it to write the file name using this method (C:\PASTA_COMPARTILHAMENTO \RPA” + in_TransactionItem(“CNPJ”).ToString+“-”+in_TransactionItem(“COMPANY”).ToString”) so that it writes the company in the file and saves it inside the folder that this method created?

Hi,
I’m not sure I fully understood your need.
So, from my understanding, all the process is working fine, except for the fact that you still need to write something in the downloaded file?
If that’s the case:

  • Download the file to the folder you want
  • Use Word Application Scope passing the full path of the file you’ve just downloaded
  • Use Append Text or Replace Text in Document (depending on your needs) to write the text you need to add to the file

after clicking download I would like him to use this method(“C:\PASTA_COMPARTILHAMENTO\RPA” + in_TransactionItem(“CNPJ”).ToString+“-”+in_TransactionItem(“COMPANY”).ToString) to write the file name

Ah! So you can use a Type Into activity, and type your text in here:


Keep the full file path, but do not forget to add the extension!
Use Path.Combine to better concatenate the values (i.e., Path.Combine(yourPath,yourFileName))

I’m getting this error and I can’t fix it, can you help me?


Error:
Type Into : Object reference not set to an instance of an object.

Hi @william_emanoel
can you show the type into activity what you have given

Can you please show what you have in here?

image