cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DavyNix
Helper I
Helper I

Wildcard syntax for deleting files

Hi All,

Simple flow which strips attachments and saves them to local file system ready for further processing.

We've found a logo embedded in the clients Email is also being seen as an attachment and is being stripped out.  I'd like to keep the folder tidy by adding a 'delete step' at the end of the flow to delete these png files.  However the path with *.png added is returning an error:

 

DavyNix_0-1640181889374.png

Any ideas how I should do this?

 

Many Thanks - David

2 ACCEPTED SOLUTIONS

Accepted Solutions
DavyNix
Helper I
Helper I

Hi @Pstork1 

OK.  So found this thread..   Solved: Re: Control condition by checking MediaType of fil... - Power Platform Community (microsoft.... Which I copied to help build the condition. 

DavyNix_2-1640186500530.png

 

which then gives this error:

DavyNix_3-1640186628155.png

 





 

View solution in original post

What are you feeding into the condition?  It should be the Attachments file name, not the Attachments.  You're using an array in the condition rather than one of the items being processed by the Apply to each.



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

Join me at 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!

View solution in original post

3 REPLIES 3
Pstork1
Dual Super User
Dual Super User

I don't know of any way to delete files in the file system using a wildcard in Power Automate.  I would suggest instead adding a condition prior to your Create file action that checks the extension of the attachment.  Then only create the file if its not .png.  That would be more efficient than trying to delete them later.



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

Join me at 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!
DavyNix
Helper I
Helper I

Hi @Pstork1 

OK.  So found this thread..   Solved: Re: Control condition by checking MediaType of fil... - Power Platform Community (microsoft.... Which I copied to help build the condition. 

DavyNix_2-1640186500530.png

 

which then gives this error:

DavyNix_3-1640186628155.png

 





 

What are you feeding into the condition?  It should be the Attachments file name, not the Attachments.  You're using an array in the condition rather than one of the items being processed by the Apply to each.



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

Join me at 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!

Helpful resources

Announcements
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.

Users online (1,916)