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 check if a file...
Power Automate
Answered

How to check if a file has not been updated

(0) ShareShare
ReportReport
Posted on by 4

Hello there,

I would really appreciate if someone could help me. My problem is the following:

First of all, I have a process that every 5 minutes updates the content of two excel files that I have in the same Onedrive folder. But this process fails sometimes, and I need to check when it has not updated the files.

To perform this check I want to use Power Automate Desktop. I want to create a flow that every time I run it checks if the update date-time of the files is more than 10 minutes earlier than the current one. And if that condition occurs (that is, only if the date-time of the files is 10 minutes older than the current one), Power Automate should send me an email notification.

That is the important part of what I want to do.

Then I will insert that flow into a loop, adding before the end of the loop a pause of approximately 9min50ss, and thus the loop will repeat itself more or less every 10 minutes. And if I program it to loop about 4,500 times, it will be enough for me to check it once a month to reset the counter back to 4,500.

My problem is, for one thing, I don't know how to tell Power Automate Desktop how to check the last modified date-time of a file. I have tried "Get Files in Folder" and "Set variable" but no success. I clarify that this could be done by checking the date-time of the files in the computer folder or in Onedrive's cloud service.

On the other hand, I also don't know how to tell Power Automate Desktop to compare that date-time with the current one. In this case I think I have found information to do it with Power Automate cloud flows, but not with the Desktop version.

Just in case I indicate that I have OneDrive configured with the Paris time, as well as the computer. I'm saying this because I also don't know if it is necessary to tell Power Automate to take the time zone into account.

And finally, if it's easier, I have no problem checking only one of the two files, because when the update process fails, it fails both. On the other hand, if it's convenient, I could also store each file in different folders.

Thank you very much for your help.

  • Verified answer
    MichaelAnnis Profile Picture
    5,727 Moderator on at

    Files have the property "LastModified".  So, you can do this:

     

    MichaelAnnis_0-1629991128526.png

    The biggest issue was that the If command will not compare Dates/Times, so you have to convert the DateTimes to text -> standard format -> sortable.  This gives them a numeric value that can be compared.

     

    Best of luck!

     

     

     

     

     

  • Joxe Profile Picture
    4 on at

    MichaeI, a very clear proposal.

    I had to change your flow a bit, because the Subtract Dates step was not working for me. I have done it like this:

     

    Joxe_0-1630236374567.png

     

    Thank you very much!

     

    Joxe

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 259 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 227 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 134 Super User 2026 Season 2

Last 30 days Overall leaderboard