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 / Check if a file name a...
Power Automate
Answered

Check if a file name already exists in a SharePoint folder

(0) ShareShare
ReportReport
Posted on by 69

I have a workflow that needs to check to see if an email attachment has already been uploaded to a specific SharePoint folder. I need it to check for the filename without extension.

 

I have tried a few different things , without success.

 

Currently I am using the Get Files (properties only) action. *I then have a filter array, filtered to see if the Get Files dynamic value "Name" is equal to the Outlook Attachment Name (trimmed to remove the extension) *Then I am taking the length of the filter array to see if it equals 0

If it equals 0, it will create the file in the folder If it is not equal to 0, it means the file already exists and it will not create the file in the folder

 

Results: The flow isn't performing as expected and instead is resulting in everything being a new file and creates it in the folder. It's not looking just for the file name, it's looking at the file extension as well  (which I don't want to do) Some users might upload with .xlsx and others with .xls , so we only care about the file name.

 

Ckatz_1-1655137569330.png

 

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    Ckatz Profile Picture
    69 on at

    I figured out another way to make this work. I replaced the SharePoint Get Files (properties only) action with the SharePoint List Files action.

    Ckatz_0-1655150279298.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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 632

#2
Haque Profile Picture

Haque 458

#3
Valantis Profile Picture

Valantis 357

Last 30 days Overall leaderboard