Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Power Automate Desktop
Suggested answer

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
Categories:
  • Nived_Nambiar Profile Picture
    17,895 Super User 2025 Season 1 on at
    Get File Name from a directory on a windows server
    Hi
     
    if the issue is resolved, kindly mark the answer as solution.
     
  • ME-14102049-0 Profile Picture
    43 on at
    Get File Name from a directory on a windows server
    I believe I see what I dd wrong. I've marked your answer as the solution. Thanks,  for your help.
  • ME-14102049-0 Profile Picture
    43 on at
    Get File Name from a directory on a windows server
    I'm not getting just the file name, I'm getting the path and the file name. He is my process with the results.
  • Suggested answer
    Nived_Nambiar Profile Picture
    17,895 Super User 2025 Season 1 on at
    Get File Name from a directory on a windows server
    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 !
     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1