Selecting Multiple Downloaded Files To Move To New Folder

My process goes to a website which has 15ish links to download documents. I created click activities to click on each one to download. Now they are all in my download folder along with other stuff from a long time ago.

What I want to do is select all of these newly downloaded documents and send them to a specified folder.

Is there any way to select them all at once or do I need to create a Move File activity 15 times? Since there are lots of random unrelated files in the downloaded folder, I was also wondering if a condition to select the documents could be whether it was created in the last 10 minutes from the current time.

The only other option I could think of is to individually open and save at a new location for every file which isn’t very efficient.

@ds56

Great Question!

You’ll be happy to know there is a better solution. Use an assign activity Directory.GetFiles(FolderName) and then use a For Each loop where you loop through the array and you only have to create 1 move file inside the For Each.

Yes, you can extract files based on a multitude of parameters, and file modified time is one. Search the Forums for ways to accomplish that. In addition, you can check out UiPath GO! and they have a pre-built solution for you to download directly. See here: https://go.uipath.com/component/find-recently-modified-file-in-a-directory

For example, you could create a “Temporary” folder where you create the folder, save the files to, move them, and then delete the folder. This is not the most efficient but just another way to think of it.

Thanks,
Brad

Attempted Move Solution.xaml (7.4 KB)

Thanks for the info! I was attempting to do something similar to your first point based on a solution found on this forum. The problem is I cant get the move activity to find my folders. I had assigned my variables the full file path. Any ideas?

@ds56,

Please find the attached workflow.FileMoves.xaml (6.5 KB)

Regards,
Lakshman Ganta.

2 Likes

I will suggest that while downloading only if possible ,save it in the required folder than you will not be needing this activity to be performed and also it will save your time.
Go with the option in which , you can assign the path where this file can be saved instead of downloading it in default folder.

1 Like

I would definitely prefer this method too. Every time I click on the document hyperlink it will automatically download so I’m not sure how I can specify the path for it to be downloaded. The only action I use is the click activity which goes down the list of hyperlinks and clicks once on each one.

Is there something I’m missing? I’d really like to hear how to specify the download location if it’s still possible in this scenario.

Awesome! Thank you, that worked.

1 Like

@ds56,

Please mark it as solution and it will be useful to others.

file moves based on date - Copy.xaml (8.3 KB)

I’ve attached the final solution to my entire problem for anybody that would also like to know how to solve this. This solution utilizes lakshman’s solution with additional modifications. This workflow will ONLY move the files that were downloaded during the current day. It also uses an additional wildcard character to take all files regardless of type.

1 Like

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