web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / move files with lastmo...
Power Automate
Unanswered

move files with lastmodified date > 30 days to another folder

(0) ShareShare
ReportReport
Posted on by

Hi Everyone,

 

I'm new to Flow, so I'm not sure if this is even possible? Just wondering if someone could provide some feedback? Can the above be achieved?
I see events that are triggered on file creation etc. but not one I can trigger say once a week or once a month etc.

 

Basically what I want to do is search through a document folder and move any file that hasn't been modified for 30 days to an 'Archive' folder?

 

Any comments or suggestions?

 

 

 

Thanks in advance

Categories:
I have the same question (0)
  • v-micsh-msft Profile Picture
    on at
    Re: move files with lastmodified date > 30 days to another folder

    Hi @Anonymous,

     

    Would you please share information about what the data source you would like to work with?

    Actually there is a way to deal with the modified date, first we need the source connection under Microsoft Flow contains the List files in folder Action.

    After add the List files in folder action, add a condition, choose the LastModified property as the input of the first Input box, this would add an Apply to Each automatically, after that, click the Advanced mode of condition, copy and paste the following code:

    @greaterorequals(sub(int(utcnow('yyyyMMdd')),int(formatdatetime(item()?['LastModified'],'yyyyMMdd'))), 30)

    Then under the Yes part, add the Copy file Action, then Add the Delete file Action.

    By testing I found some problems when working with the Apply to each, I will update here once I got the response back from PG.

    Regards,

    Michael

  • Community Power Platform Member Profile Picture
    on at
    Re: move files with lastmodified date > 30 days to another folder

    I also have need for this.  To move files older than 30 days in one folder to another (archive) folder in the same SharePoint site. 

    I guess I need clarification on which triggers, conditions  and actions to use. 

    Thank you. 

  • cookierun22 Profile Picture
    2 on at
    Re: move files with lastmodified date > 30 days to another folder

    Hi does anyone have complete flow for this?

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

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard