Download file with dynamic filename

Hi all!

I’ve been playing around a bit, but am struggling to get the following done. I have a file which I’d like to download an a daily base. This file is generated every night and then stored in a cloud drive. The first part of the filename is like “Dummy Name - Group X - 2020-04-08 00_39 CEST.xlsx”. Tomorrow the name will be like “Dummy Name - Group X - 2020-04-09 00_39 CEST.xlsx”. Each new report thus has the data and time of generating this report. How can I make sure UI Path downloads this report based on the first part of the file name. I’ve tried using a fuzzy match, but it doesn’t seem to work.

Any help would be appreciated :slight_smile:

Hey Nipius, I’ve created a video that solves your exact example. Let me know, if that’s what you need :slightly_smiling_face:

1 Like

You can try the below steps.

  1. GetFileName without extension
  2. Check the file name starts with “Dummy Name”
  3. Downlaod the file

Thanks a ton, Anders. Unfortunately, I wasn’t clear in my post that I’m actually referring to a cloud drive on a website. One of our systems allows us to schedule the creation of reports. They are then stored (in the way I described above) on a cloud drive, which you can only access via a browser. I can access this page through a static URL.

I can completely follow your clear instructions, but am not sure how to apply this logic to a URL, rather than a folder on my local machine.

Many thanks for any follow-up instructions. And I’ll definitely check-out all the other extremely useful video’s you’ve created! Really cool stuff :slight_smile:

Thank you :slight_smile: Can you give an example of such a drive on a website? Maybe just another site, that looks like yours.

Sure! Let me know if the below screenshot is of any help :slight_smile:

The URL would be something like this:$4567.htmld

Sure, then we first need to download the files, we need:

(1) Datascrape the files (you’ll get all the names into a datatable)
(2) Now I will make a For Each Row and then download each one of the files with a dynamic selector

If you only need one file (like the one from today), then I would apply a filter to the For Each Row.

After that you got the files needed and you could go with the process in my video.

Ps. You could also just download all the files and then apply the ‘today’ filter afterwards as I did it in the video.

1 Like

Apologies for the delayed response. The past two weeks were hectic.

I’ll have a look later this month on how to apply this. Really appreciate the input you’ve provided!