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 / How to get specific on...
Power Automate
Answered

How to get specific only one file from local machine folder

(0) ShareShare
ReportReport
Posted on by 5

Hi All,

 

I am learning power automate desktop and I have query how to get specific only one file from local machine folder? If anyone know this please help me.

I have the same question (0)
  • CU31080729-3 Profile Picture
    502 Moderator on at

    Hi OmkarK9,

    you can used get file in folder action for getting file from folder you can provide filter for your file as per your requirement.

     

    Chetan_Ninghot_0-1715322762597.png

     

     

    (Note:- if you got your solution you can mark as solution and gives kudos)

     

    Thanks & Regards

    Chetan Ninghot

  • Verified answer
    VishnuReddy1997 Profile Picture
    2,656 Super User 2026 Season 1 on at

    Hi @OmkarK9 ,

     

    You have 2 methods. Please find the solution.

     

    1. You can Get File path Part you will get all the required fields as shown in below image.

    VishnuReddy1997_0-1715322770965.png

     

    2. You need to get all the files in the folder then need to apply the conditions as shown in below image.

    VishnuReddy1997_3-1715322962586.png

     

     

    Code:

    Folder.GetFiles Folder: $'''C:\\Users\\OneDrive\\Desktop\\Power Automate Desktop\\Doc_templates\\Doc_templates''' FileFilter: $'''*''' IncludeSubfolders: False FailOnAccessDenied: True SortBy1: Folder.SortBy.NoSort SortDescending1: False SortBy2: Folder.SortBy.NoSort SortDescending2: False SortBy3: Folder.SortBy.NoSort SortDescending3: False Files=> Files
    LOOP FOREACH CurrentItem IN Files
     IF CurrentItem.NameWithoutExtension = $'''UAT Test Results''' THEN
     Display.ShowMessageDialog.ShowMessage Message: CurrentItem.FullName Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed
     END
    END

     

    (Note:- if you got your solution you can mark as solution and gives kudos)


    Thanks & Regards

    Vishnu Reddy

  • pradeepvarma Profile Picture
    55 on at

    If you know the full file name, you may use this activity:

    1. If file exists and based on outcome, you may use other activities.

    If you don't know the full name of file, you may use below activity to get the files that contain partial name and use a loop to use those files for further processing:

    1. Get files in folder

    Choose a filter to limit the files retrieved. This parameter allows wild cards, for example, *.txt or document?.doc. To allow for multiple file filters, separate the choices with a semi-colon, for example, .txt;.exe.

     

    If it works for you, kindly mark it as a solution.

     

    Regards,

    Pradeep Varma

    Follow on LinkedIn

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 641

#2
Vish WR Profile Picture

Vish WR 640

#3
Haque Profile Picture

Haque 495

Last 30 days Overall leaderboard