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 / Flow sees subfolders a...
Power Automate
Answered

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:
  • 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 263

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard