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 / "If file exists" with ...
Power Automate
Answered

"If file exists" with wildcard - Does wildcard or variables work with "if file exists"?

(0) ShareShare
ReportReport
Posted on by 15

I have tried finding a working solution to my problem using many attempts and some limited search hits on google. 

But so far, no cigar 🙂

 

The problem should have been simple, but apparently, it is not.

 

Use Case: I want to download some files, and instead of using "wait ?? sec" before the file maybe finished downloading, before continuing, I would like to check if the file is downloaded before downloading another file. 

 

This is my simple flow to test with

DankyDuck_0-1662037172584.png

 

This works. 

DankyDuck_1-1662037207350.png

 

This doesn't work. 

DankyDuck_2-1662037248868.png

 

So adding any form of wildcard or variable to the Filepath, i get nothing. 

 

  • ryule Profile Picture
    929 Super User 2024 Season 1 on at

    Maybe you could throw in a "Get files in folder" action with the wild card, and use the output from that for your analysis:

     

    ryule_0-1662056203065.png

     

  • Kaif_Siddique Profile Picture
    2,108 Super User 2024 Season 1 on at

    Use Get Files in Folder action to fetch all the files having file name Test*.xlsx then using For each validate it.

     

    Kaif_Siddique_0-1662057020271.png

     

    Let me know if any queries.

     

    If you like my response, please give it a Thumbs Up.
    If this helps, please Accept as solution.

     

    Regards
    Kaif

  • DankyDuck Profile Picture
    15 on at

    Thank you for your reply.

     

    That did not work, using Wildcare or a Variable in the IF statement is not allowed. 

    DankyDuck_2-1662096885031.png

     

    DankyDuck_1-1662096868609.png

     

    DankyDuck_3-1662096949285.png

     

  • Verified answer
    DankyDuck Profile Picture
    15 on at

    So I sort of found a solution. Not if you want to solve the problem with the IF statement. 
    But PAD has an action called "Wait for file" and this allowed me to look for the file, and use variables and a wildcard in that variable, before continuing the flow.

     

    As an added bonus, I was also able to add the file index so it looks for the filename + wildcard + last modified. 

     

    DankyDuck_0-1662101429057.png

    DankyDuck_1-1662101453303.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

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 349 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard