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 / How to retrieve the re...
Power Automate
Answered

How to retrieve the recent file in Power Automate Desktop

(0) ShareShare
ReportReport
Posted on by 517

Hello,

how can I retrieve the last (most recent) file added to the folder?
I have tried this If Statement

dkayt_0-1699542911238.png

but it does not help me achieve the goal I want to achieve.

Can anyone point me in the right direction?

Regards,

d'Kayt

I have the same question (0)
  • Verified answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @dkayt 

     

    a simple method would help 🙂

     

    Nived_Nambiar_0-1699543328942.png

     

    here i am using get files in folder action to get list of all files which would be sorted by creation time in descending order 🙂

    Nived_Nambiar_1-1699543375034.png

     

    Nived_Nambiar_2-1699543388356.png

     

    Nived_Nambiar_3-1699543399221.png

     

     

    Now the output is stored in %Files% variable, Now use %Files[0]% to retrive a most recent file 🙂

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • Verified answer
    Pavel_NaNoi Profile Picture
    1,074 on at

    in the "Get files in folder" action you can go into "advanced" and sort by what you want, in this case, creation time. this will generate a list, simply set a variable to %Files[0]% and you'll have the latest file.

  • dkayt Profile Picture
    517 on at

    @Nived_Nambiar and @Pavel_NaNoi 

    Thank you  guys for your quick answer. Your solutions work very well. Have a nice weekend.

     

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard