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 / Copy files from one Sh...
Power Automate
Suggested Answer

Copy files from one SharePoint to another while excluding specific file (.mp4, .m4a, .vtt, .vsdx)?

(0) ShareShare
ReportReport
Posted on by 2
Hi everyone,
I am trying to build a Power Automate cloud flow that copies files from 
one SharePoint document library to another SharePoint document library. 
However, I do NOT want to copy ALL files — I need to exclude certain 
file types from being copied.
**File types to EXCLUDE:**
- .mp4
- .m4a
- .vtt
- .vsdx
**What I want:**
All other files (e.g., .pdf, .docx, .xlsx, .pptx, .png, etc.) should 
be copied from the source SharePoint library to the destination 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    trice602 Profile Picture
    16,426 Super User 2026 Season 2 on at
    Hi there!
     
    Filter array is not the answer here since your trigger is for a single file and will not return an array.  That said, use a CONDITION in advance mode and use this.
     
    
    @not(
       or(
          endsWith(triggerOutputs()?['body/{FilenameWithExtension}'],'.mp4'),
          endsWith(triggerOutputs()?['body/{FilenameWithExtension}'],'.m4a'),
          endsWith(triggerOutputs()?['body/{FilenameWithExtension}'],'.vtt'),
          endsWith(triggerOutputs()?['body/{FilenameWithExtension}'],'.vsdx')
       )
    )
    
     
    or this one
     
    
    @not(
       or(
          equals(triggerOutputs()?['body/File_x0020_Type'],'mp4'),
          equals(triggerOutputs()?['body/File_x0020_Type'],'m4a'),
          equals(triggerOutputs()?['body/File_x0020_Type'],'vtt'),
          equals(triggerOutputs()?['body/File_x0020_Type'],'vsdx')
       )
    )
    
     
    That's essentially going to filter out the files you want to skip.
     
    Pro tip:  move this into the trigger condition and your flow won't trigger for those files at all and you can skip the condition entirely.
     

    ------------------------------------------------

     

     

    ⭐ If this was helpful, please like and check the box below "Does this answer your question" to help others find this too!

     

     

    Always glad to help! 💯💯💯💯💯

     

    Tom

     

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

  • Ellis Karim Profile Picture
    12,236 Super User 2026 Season 2 on at
     

    Hi, just a quick note that you've posted the same question multiple times. To keep the forum organised and avoid splitting responses, please continue the discussion in your original thread.

    I've locked this duplicate post and added a link to the original topic. Thanks for your understanding.

     
    Ellis Karim
    Ellis Karim
    elliskarim.com  |  LinkedIn  |  Bluesky
    If this solved your issue, please mark it as ✅ Accepted Answer. If it helped, feel free to give it a 🩷 Like!

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 306 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 169 Super User 2026 Season 2

#3
Haque Profile Picture

Haque 131 Super User 2026 Season 2

Last 30 days Overall leaderboard