Hi!
I have a flow, which I want to schedule every 20th each month.
This flow should check if there are any files in a specific folder on my OneDrive, BUT exclude subfolders and files in there.
If there are any files in that exact folder, attach those files in an email and send.
My issue is that I cant figure out how to ignore the subfolder.
Any ideas?
Hello - I am trying to achieve the same using Power Bi - anyone have helpful tactics to ommit certain subfolders?
Current function is simply ' Source = Folder.Files("file location")
I am trying to ommit specific sub folders within those parent files.
Hi Barry, I know this is an old post but just wanted to say this worked perfectly for me when I had the same issue today, so many thanks 👍
cheers
Richard
It didn't quite work for me, but I managed to validate on the file path that If [file path] contains [subfolder name], it will skip that file.
Hi @MathiasJ ,
Below is my test result. In Apply to each, only the files and subfolders in the specified folder are traversed, the files in the subfolders are not included.
And I used Condition to exclude the subfolders, so I can only get the file contents of the files in the specified folder.
Flow configuration:
The specified folder in OneDrive:
Flow run history:
Only traversed 7 items, excluding subfolders, and only getting the contents of the file when Condition is true.
Best Regards,
Unfortunately, the search is still looping through the files in that subfolder. I am only interested in files in the parent folder
Hi @MathiasJ ,
You could use Is folder? to exclude subfolders and files inside it in the specified folder.
Image reference:
Best Regards,
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2