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 / Find Files in Folder b...
Power Automate
Answered

Find Files in Folder by Path

(0) ShareShare
ReportReport
Posted on by 288

Hello.

 

I'm trying to determine if a file Exists or not in a directory (folder).

I know the folder is EMPTY...nothing in it.  However a similar file name is in a different directory...why is it picking up a file in a different directory when it should be returning NOTHING or Zero Files???  See screen shot:

 

I know the TEMP folder is EMPTY...however you can see from the screen shot below it found a file in a totally different directory???

 

2022-12-09_16-17-15.png

Categories:
I have the same question (0)
  • Verified answer
    Ellis Karim Profile Picture
    11,940 Super User 2026 Season 1 on at

    Hi @smithmrk ,

     

    It seems that the Find files in folder by path action also searches within subfolders - i.e. folders underneath /1099/TEMP.

     

    You may be able to get away with using Pattern for the File Search Mode, then filter the results, filtering for the exact file path and filename?  Using OneDriveSearch for the File Search Mode doesn't return the full path of the file so we can't filter the files based on the path.

     

    Snag_139387c8.png

     

    In the sample results below, note the two paths as returned by the Pattern search mode:

     

     

     

     {
     "Id": "b!nzu48wrMZk6wUa2mtk43v-BAQOSBY366FHKIOJSAKCX54C4",
     "Name": "Test1.docx",
     "NameNoExt": "Test1",
     "DisplayName": "Test1.docx",
     "Path": "/1099/TEMP/Test1.docx",
    
    {
     "Id": "b!nzu48wrMZk6wUa2mtk43v-F8iPoxJAxKiXUPzIa7meKD4I4K",
     "Name": "Test1.docx",
     "NameNoExt": "Test1",
     "DisplayName": "Test1.docx",
     "Path": "/drives/b!nzu48wrMZk6wUa2mtk43v-F8iPoxJAxKiXUPzIa7meKhmZ2_IOOwTJX7DMvB0_J0/root:/1099/TEMP/sub1/Test1.docx",
    

     

     

     

     

    Snag_13951146.png

     

    Hope this helps.


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 308

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 226 Most Valuable Professional

Last 30 days Overall leaderboard