Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Wait for file - wildcard?

Ì have a folder where XML-files with unknown name will be written to.
It would be perfect if you could add a "Wait for file" and set the path with a wildcard - e.g. C:\Temp\*.xml but this doesn't seem to work.

This would be in a while loop - and the flow would wait for a file to appear and then do certain operations.

I could use a "Get files in folder" in a loop with a for each - but that doesn't seem effective.

Is there any other way to solve this?

New Member

+1 I also need to use the same in my organisation if someone know how to do it ...

Memorable Member
Memorable Member

PAD has no local triggers. So you can only check the files in a folder within a loop and filter by new files with the extension xml. Or schedule the run through a cloud flow.

Frequent Visitor

Hi @LHole ,
I was looking for the same information but I did not find it.
So I created a manual checker as you can see below


Get files in folder allows you to use wildcard *.
I hope this helps.

Super User
Super User

The wildcard option may have worked in versions prior to 2.14.
As of 2.14 the wildcard stopped working in file operations.
But Microsoft will have a new version ready mid-dec. that should fix all the 2.14 bugs. or so they say.

Super User
Super User

How often do you plan to run this?  Like one user said, there is no trigger, you still have to start the process manually. 

if you could record somewhere the last time the bot was ran (ex. Environment variable or in Excel, etc), then you could say:


Get files (*.xml) in folder - sort by date last modified descending

for each file in files

if date last modified is before %lastrun% (the date/time of the last run)

     End flow


‘Do something with file

End (for each)


this will process them in order of most current to least current and will stop on the file last modified before the last run. 

This solution worked for me, thanks!89d6a923-beb4-4cd4-88f5-860178880921.png

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Top Kudoed Authors
Users online (2,853)