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 / Selecting desired file...
Power Automate
Answered

Selecting desired file in browser pop-up window

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Dear Sir/Madam,

 

I am trying to select a file from a browser window. The file to be selected may change in terms of file name.

Currently, the flow selects the file from a browser pop-up window based on clicking, and the file to be selected is unable to varied by making the name of the file a variable.

I tried out defining and using variables, and it seems I am able to use them in flow actions like increasing their value by one, but how do I apply this to the clicking action.

 

Selecting of file from pop-up window of browser:

TanBoonChang_0-1698906428222.png

 

Flow action defined to select the desired file:

TanBoonChang_0-1698905503299.png

 

Would appreciate some advice on how to automate the selection of file varied based on file name (i.e. the flow selects "file1.txt" the first time, and then "file2.txt" the next time and so on, in the pop-up browser window). Such as by making the selected file name be a variable, instead of clicking the same file every time, or some other possible solutions.

 

Appreciate the help.

 

Yours Sincerely,

Tan Boon Chang

  • Verified answer
    UshaJyothiKasibhotla Profile Picture
    229 Moderator on at

    Use populate text field on window by giving the variable of your file name for typing the file name which is stored in the variable 

    You have to use populate text field in window for typing the file name in window 

    Then click on open by using click activity

    Hope this helps

    Usha

     

     

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @Anonymous 

     

    A simple solution 🙂

     

    Why don't you make the flow to type the complete file path (including the file name) in the below highlighted field using UI Automation actions as @UshaJyothi20  said. That would be most reliable approach !

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi, thank you for the reply. It is working currently. I am wondering if there is a way to select the file based on timestamp (i.e. date created in folder)?

     

    Best regards,

    Tan Boon Chang

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    If you have received a reply to your topic, please make sure you accept it as a solution, so that it is easier for others to find it later on.

     

    As for the other question - to get a file, you will need to use the Get files in folder action. You can then apply sorting based on the created date in the advanced options of the action. This will return a list, so even if you are expecting only one file, you will still need to access it as %Files[0]% (to get the first item in the list).

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi,

     

    I have tried this and is able to get the latest file.

    However, the flow actually paste the file with the whole file path into the file name of the selection window.

     

    TanBoonChang_0-1699369526520.jpg

    Correct me if I am wrong. From this, it seems that "%Files[0]%" contains the whole file path of the file (i.e. "C:\User\etc\file1.txt", instead of only "file1.txt") How do I extract the file name only, without the whole file path? Is there tools to cut particular portion from an obtained "%Files[0]"? Is this issue only occurring for the selection window which I am using?

     

     

    Best regards,

    Tan Boon Chang

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @Anonymous 

     

    You can get the file name like trying this expression:

    %Files[0].FullName%

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Nived,

     

    Your instruction does not work.

    It is still having the whole file path.

     

    Best regards,

    Tan Boon Chang

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @Anonymous 

     

    Sorry my mistake,

     

    It should be : %Files[0].Name%

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Nived,

     

    Thank you. It worked.

    Side note. Is there a way to wait for new files to appear in the folder, and then the flow starts?

     

    Best regards,

    Tan Boon Chang

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard