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
Solved! Go to Solution.
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".
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".
User | Count |
---|---|
25 | |
14 | |
12 | |
10 | |
9 |
User | Count |
---|---|
51 | |
29 | |
28 | |
24 | |
22 |