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 / 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,735 Super User 2025 Season 2 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

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
David_MA Profile Picture

David_MA 245 Super User 2025 Season 2

#2
Expiscornovus Profile Picture

Expiscornovus 207 Most Valuable Professional

#3
trice602 Profile Picture

trice602 190 Super User 2025 Season 2

Last 30 days Overall leaderboard