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

Community site session details

Session Id : kQqwf+Y6gxRjfEDLzco78y
Power Automate - Power Automate Desktop
Unanswered

How to handle dynamic file path using wild cards

Like (1) ShareShare
ReportReport
Posted on 2 May 2021 12:35:43 by

Hi, I have to check if a file is present in a folder. The format of the file name is "Broadband prevet dd-mm-yyyy.xlsx". The date is dynamic here. Can anyone please help how to handle this dynamic date as it would be changing. Iam using Broadband prevet *.xlsx. But it is not working.  I want to achieve this on power automate desktop. 

  • Pavel_NaNoi Profile Picture
    1,072 on 23 May 2022 at 14:00:51
    Re: How to handle dynamic file path using wild cards

    You can use a get file activity followed by a parse of the entire list for multiple matches with a regex that checks for "Broadband prevet" followed by either a regex that just finds any date (just search for some online if need be) or create your own custom one , e.g. "Broadband prevet \d\d-\d\d-\d\d\d\d" and there you'll have a list containing all the file paths to the files that you want, that you can do w/e you want to with.

  • dw2099 Profile Picture
    4 on 23 May 2022 at 13:11:57
    Re: How to handle dynamic file path using wild cards

    This is a huge limitation of power automate.  If you need this functionality JAMS scheduler is a better option.  

  • Henrik_M_Aller Profile Picture
    4 on 18 May 2022 at 06:49:24
    Re: How to handle dynamic file path using wild cards

    Since the output of Get files is a list, you have to provide an index for a file path input to work, such as %Files[0]%

  • Angelica650 Profile Picture
    6 on 17 May 2022 at 20:00:47
    Re: How to handle dynamic file path using wild cards

    Is there a way to read the file using the powerautomate using dynamic file names?  it refuses me to use the variable as a file path

  • burque505 Profile Picture
    398 on 02 May 2021 at 13:09:32
    Re: How to handle dynamic file path using wild cards

    This is limited to your specific use case as stated. It will only work if the files you're looking for are strictly in that format. The message displayed at the end shows how it will fail if a file has the same prefix but extra characters after that.

    flow.PNG

    (There's a space after "Broadband prevet ", like that without the quotes.)

    save variable.PNG

    get files.PNG

    Files for test:

    files in folder.PNG

    Message:

    message-1.PNG

     

    However, this method will eliminate the 'guinea pig' file displayed above:

    get_2.PNG

    This will work for your case also, but isn't as flexible.

     

    get_3.PNG

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete