web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flow sees subfolders a...
Power Automate
Unanswered

Flow sees subfolders as files and fails - Statuscode 404

(0) ShareShare
ReportReport
Posted on by 3

Please forgive my ignorance but i am VERY new to Power Automate. i have a flow that is supposed to delete SharePoint files older than 7 years (for testing purposes i have the flow set to copy the file for now)..

 

Everything appears to be fine until i get to the Apply to each ->Get file metadata step. The flow fails saying the file does not exist. When you look at the path it is listing the sub folders as the file identifier not an actual file.

 

I've included a screenshot of my flow. any help would be greatly appreciated.

 

Thanks

Flow1.PNGFlow2.PNG

Categories:
I have the same question (0)
  • Verified answer
    MattWeston365 Profile Picture
    1,701 on at

    Hi @Rabb76 this is quite an easy fix to filter out anything that's a folder. Assuming that you haven't created a custom content type for your folders, then you can target that specific content type name.

     

    In you filter query, add an additional filter to say that you don't want to include folders. I have used:

    ContentType ne 'Folder'

     

    ne means not equal to.

     

    So just add and ContentType ne 'Folder' and your should then only have files. Alternatively you could do some checking within your loop, as you can run a condition on the dynamic content "IsFolder".

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard