Download file from URL to a required location

Hello Everyone,

I am trying to download a file from the URL directly (auto download). the URL itself is having the file name at the end with the extension.

I have tried it with the C# code & vb.net code which are not working.

Would request if anyone has any other idea .

Regards
Divya Varshney

@Divya3

Please install webapi packages and then use http request …pass the url in Request URL field…and you have a field Filename for response attachment which you can give a filepath and the response file is saved there

https://docs.uipath.com/lang-ru/activities/docs/http-client

Hope this helps

cheers

Hi @Anil_G ,

Thanks for the response , I have tried webAPI as well . it throws an error and the message is “Method not found” .

Thanks
Divya Varshney

did u already try invoke code like this?

Code inside invoke code

Using wc As New System.Net.WebClient()
wc.DownloadFile(Url,Path)
End Using

Arguments to ur invoke code activity:
image

what error msg u get?

Hello @Divya3

you can use Xebia - Download File from URL - RPA Component | UiPath Marketplace activity to directly download the file from URL.

Cheers

@Divya3

The error looks like it is conflicting with some other dependency…can you try it in a fresh project and also are you getting thsi error when you run it?

Cheers

Hi @kali ,

Yes I tried this ,but the file which got downloaded was corrupted.

Regards
Divya Varshney