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 / Move files based on .C...
Power Automate
Answered

Move files based on .CreationTime

(0) ShareShare
ReportReport
Posted on by 138

I have created a List of files successfully and need to move only those based on .CreationTime that = a FormatedDateTime variable, into another folder. The variables created are shown below.

What are the Desktop Actions needed to Move only the files that have this FormatedDateTime?

I have tried many options but get an error each time  

garthh_0-1686783505712.png

 

I have the same question (0)
  • Verified answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @garthh 

     

    Try something like this 

    Nived_Nambiar_0-1686846055122.png

     

    Nived_Nambiar_1-1686846064830.png

     

     

  • garthh Profile Picture
    138 on at

    Nived

    Thank you

    I was on the right track with For each and If but didn't have the first operands format correct. I'll get back once I have the time to try it

  • garthh Profile Picture
    138 on at

    Nived

    I believe these Actions are correct, no error appeared when run however, the files were not moved.

    I used the default CurrentItem variable name

    The first and second operands FormattedDateTime4 are shown

    Thoughts?

    garthh_0-1686875760649.png

     

  • garthh Profile Picture
    138 on at

    Nived

    I notice Month have different formats

    In the file list Month is 6

    In FormattedDateTime4 Month is 06

    Is this the issue? A solution for this?

    garthh_1-1686876650081.png

     

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    for the formmated date, could you change that to M/dd/yyyy type and the compare, i think that would work 

    something like below

    Nived_Nambiar_0-1686883288726.png

     

     

  • garthh Profile Picture
    138 on at

    Nived

    Found that myself and Move works

    Thank you again for the helping

     

     

  • garthh Profile Picture
    138 on at

    Nived

    Can you help?

    This PAD flow worked well but doesn't now!

    Can you see why?

    I have checked the CreationTime dates in Files2 against FormattedDate4

    garthh_0-1691026547126.png

     

     

     

    Move files by date PAD.gif
  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    What's the format of your %FormattedDate4%? If it uses either MM or dd in the format, it will have leading zeros in the month and/or day (as in 08/03/2023), whereas doing %CurrentItem.CreationTime.Month% and %CurrentItem.CreationTime.Day% will not (as in 8/3/2023). Try using M/d/yyyy when formatting the date.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

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

#2
11manish Profile Picture

11manish 171 Super User 2026 Season 2

#3
Haque Profile Picture

Haque 137 Super User 2026 Season 2

Last 30 days Overall leaderboard