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 / Get files in a directo...
Power Automate
Suggested Answer

Get files in a directory from a file name list

(0) ShareShare
ReportReport
Posted on by 43
1) I have File1 containing a list of file names such as C0001.
2) I have a directory containing files with names like A_C0001_20240101.pdf
3) I need to pull the files from the directory that match to the names in File1.
 
Can someone show me how to do that.
 
Thank you.
 
 
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at
    Hi,
     
    Just to confirm- so you have a pattern named C0001 and you need the bot to fetch the list of files from folder containing the word C0001 , if yes- try the below flow design 
     
     
     
     
     
    Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs
     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you!

     
  • ME-14102049-0 Profile Picture
    43 on at
    Rereading my original post I don't think I was clear. I'm retyping the original post.
     
    1) I have directory named File1 containing a list of file names such as
     C0001
     C0002
     C0003
    2) I have a directory named File2 containing files with names like
    A_C0001_20240101.pdf
    BBB_C0002_20240101.pdf
    CC_C0003_20240101.pdf
    3) I need to pull the files from the directory File2 that have a partial match to the names in directory File1
  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at
    Hi,
     
    Just one question here- what you meant by files names in directory file 1 ?
    is it just a list with files names like C0001 etc ? or file name should be like C0001.pdf ?
     
     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 271 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 171 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 148 Super User 2026 Season 2

Last 30 days Overall leaderboard