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 / Get File Name from a d...
Power Automate
Unanswered

Get File Name from a directory on a windows server

(0) ShareShare
ReportReport
Posted on by 43
I need to create a list of file names from a directory on a windows server. I'm trying to do this through Power Automate Desktop. AI instructions tells me to use Get File Name. I don't find that function in the Desktop. Can someone advise me as to how to get the file names.
 
Thanks
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi,
     
    Try like this
     
    Here it will get list of files from a folder which contains list of file object- each file object has details of file - including its file name, so to specifically store the file name- create a seperate list and append the file name to that.
     
    You can paste the below code to get sample flow
    SET FileNames TO []
    Folder.GetFiles Folder: $'''D:\\Temp\\CustomActions''' FileFilter: $'''*''' IncludeSubfolders: False FailOnAccessDenied: True SortBy1: Folder.SortBy.NoSort SortDescending1: False SortBy2: Folder.SortBy.NoSort SortDescending2: False SortBy3: Folder.SortBy.NoSort SortDescending3: False Files=> Files2
    LOOP FOREACH File IN Files2
        SET FileNames TO FileNames + File.Name
    END
    
     
     
    Hope it helps!
     
    Mark it as solution if it resolves your query !
     
  • ME-14102049-0 Profile Picture
    43 on at
    I'm not getting just the file name, I'm getting the path and the file name. He is my process with the results.
  • ME-14102049-0 Profile Picture
    43 on at
    I believe I see what I dd wrong. I've marked your answer as the solution. Thanks,  for your help.
  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi
     
    if the issue is resolved, kindly mark the answer as solution.
     

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard