How to download a file from intranet

Hi I need to download a file from an intranet folder where a new file is added at the end of every month.
How do i automate to download the latest month’s file to a specific folder? I tried using the download file activity but i cant get it to download the last uploaded file.

Any help is appreciated!

Can you give more details? Did not understand where the file is locate ( net drive folder, cloud base folder , download from a www site? )

Will be happy to create a short sequence in uipath to solve this one for you :slight_smile:

Hi N_A,

thanks for the reply. the file is located in a internal web that is only accessible within my organisation. the url goes like this: https://(organisation internal web).(organisation name).(department).(file name+date of file).csv, whereby the date of file will change to the end of every month.

do let me know if more information is needed. thank you!

1 )Did you try to locate elements via web selectors?
2) What are the issues you have?

In this video, download files via an HTTP request.

I attached the VB.NET code:

Dim httpRequest As HttpWebRequest = DirectCast(WebRequest.Create(“https://url.pdf”), HttpWebRequest)
httpRequest.Method = WebRequestMethods.Http.Get
Dim httpResponse As HttpWebResponse = DirectCast(httpRequest.GetResponse(), HttpWebResponse)
Dim httpResponseStream As Stream = httpResponse.GetResponseStream()
Dim doc As Byte()
Dim ms As MemoryStream = New MemoryStream()
doc = ms.ToArray()
File.WriteAllBytes(“C:\yourfile.pdf”, doc)

Cristian Negulescu