cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to check if a file exists in a SharePoint library by file name?

I am trying to get a true/false response on if a file exists in a SP library given the file Name. The files do not have Titles. Based on my research, I have seen suggestions to use the Get file content using path action. I am able to test that and I do get that to run successfully. However, I don't know where to go from here. I'd like to have a condition after to essentially check if the file was found. What would it be checking on?

Edit: Now thinking Get file content using path is not the best action because the Flow fails on a bad path which I don't want to happen

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: How to check if a file exists in a SharePoint library by file name?

Hi @Anonymous 

 

Use get files properties only

do query on file name and then check the length using expression 

 

Untitled.png

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

2 REPLIES 2
Dual Super User
Dual Super User

Re: How to check if a file exists in a SharePoint library by file name?

Hi @Anonymous 

 

Use get files properties only

do query on file name and then check the length using expression 

 

Untitled.png

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

Community Support Team
Community Support Team

Re: How to check if a file exists in a SharePoint library by file name?

Hi @Anonymous ,

 

Have you take a try with @RezaDorrani 's workaround, you could take a try to achieve your needs.

 

Have your problem be solved?  If yes, please go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,227)