web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Edge - Open a Download...
Power Automate
Answered

Edge - Open a Downloaded File

(0) ShareShare
ReportReport
Posted on by 13

I am attempting to use a Flow in Power Automate Desktop to Open Microsoft Edge, navigate to a webpage, login, set parameters of a daily report and then download several unique .csv files. I need to then save the .csv files with a new name to a different location.

 

Really, I just need a way to open the file I just downloaded.

 

Is there a reliable way to make this happen? I can do this pretty easily by sending keystrokes of keyboard shortcuts, but would much rather use a less error prone option. 

 

I've tried everything I can think of, including navigating to the "Downloads bar" and attempting to control the Options Menu as a UI element as well as a web element. 

 

An alternative solution would be to launch an explorer.exe window to the downloads folder and get the file name with the most recent modified date, but Power Automate Desktop hasn't made that easy either. 

 

Any thoughts or options would be appreciated.

I have the same question (0)
  • Verified answer
    Henrik_M Profile Picture
    2,021 Super User 2024 Season 1 on at

    You should be able to Get files in folder and sort by Creation time:

     

    Henrik_M_0-1611044483389.png

     

  • miketran13 Profile Picture
    720 on at

    Hi,

     

    I have done a same process as yours before by using Edge and I got the same requirements as yours also. Check out the two pictures I attached below.

     

    So, first of all, you must change the settings from MS Edge so that will always ask you when downloading any files from the internet. It will ask you for where you want to save the file. 

     

    Screenshot 2021-01-19 172602.png

     

    Then you need to add more steps on PAD for clicking on the Save as button, specify the location, and file name for you downloading files. 

     

    Screenshot 2021-01-19 172733.png

    By using this way, you will know exactly where you stored your file with the name you set for it.

     

     

    Thanks and hope it can help you. 

    Mike

    ---------------------------------

    Did I answer your question? Please consider to Mark my post as a solution! to guide others

  • sambone95 Profile Picture
    13 on at

    I am still having issues with this flow. As for the "Get Files in Folder" option, I can sort by creation time. However, i need to be able to return the latest file and "Save As" with a new name in a different directory. 

     

    I tried the option of changing the download settings in Edge. I can not get PAD to recognize the "Save As" button as a UI element. 

     

    Robin.Core.ActionException: Click failed (failed to get UI element)
    at Robin.Modules.UIAutomation.Actions.ClickElementInWindow.Execute(ActionContext context)
    at Robin.Runtime.Engine.ActionRunner.RunAction(String action, Dictionary`2 inputArguments, Dictionary`2 outputArguments, IActionStatement statement)

     

    It seems like this should be a fairly simple task. I'm sure i am just missing something.

  • sambone95 Profile Picture
    13 on at

    I had a large number of similar files (1000s) in the destination folder. As a results, the "Get Files in Folder" function appeared to hang in PAD (I assume the sort function of all of the .csv files was taking a long time to return the most recently created file). Once I reduced the number of files in the destination folder, the process worked as expected. I marked the first answer as the solution.

  • GanCW Profile Picture
    237 on at

    Have you tried the 'Download from Web' action which you can specify the URL, the location and file name 

  • jmmillson Profile Picture
    8 on at

    I've got the same requirement. How did you get the Get Files in Folder to return just the most recent? I've got it sorting by creation time, but it returns the full list - not the single most recent? And then how do you save as?

     

    Many thanks

    Joe

  • Henrik_M Profile Picture
    2,021 Super User 2024 Season 1 on at

    %Files[0]% retrieves the first file in the sorted list.

     

    Save as is something you have to set up in the browser. By default, things are saved in the Downloads folder.

  • GanCW Profile Picture
    237 on at

    The challenges with this are we do not know where the file will be downlaoded to (yes we can hardcode for each computer but I prefer not to) and the filename may be different every time.  I have done it in 2 different ways :

    1.  Send Control-J and click on Show in Folder. You can then rename the file or send <Enter> to open the file.

    2. A more reliable method that I am using now is to configure the browser to open the Save As dialog box when downloading file.  This way I can specify the folder and name of the file.  Once saved I know exactly where the file is and I can take action on it.

     

    This is the code I use which is very robust

     

    GanCW_1-1616386406285.png

     

     

  • sambone95 Profile Picture
    13 on at

    GanCW, thank you for taking the time to respond. You are correct. Using the Send Keys function tends to be less reliable. As most of my PAD flows will be running in unattended mode, I am trying to stay away from Send Keys.

     

    As for your second option, are you using Edge? With Edge, I can configure edge://settings/downloads -> "Ask me what to do with each download". However, this creates a UI element at the bottom of the current Edge window. Not a new window. When I attempt to left click the 'Save As' UI element, I get an error in PAD - "Click Failed (failed to get UI element)".

     

    Am I missing something?

  • GanCW Profile Picture
    237 on at

    Hi @sambone95 

    I am using Chrome but edge should be similar.

    I will take a look at Edge later today.

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 376

#2
Valantis Profile Picture

Valantis 361

#3
David_MA Profile Picture

David_MA 294 Super User 2026 Season 1

Last 30 days Overall leaderboard