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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Moving specific files ...
Power Automate
Suggested Answer

Moving specific files from one folder to another

(1) ShareShare
ReportReport
Posted on by 43
  This process needs to look at a files in a folders on a Windows server. I believe this requires the Power Automate Desktop..
 
Step 1
In Folder 1 - Examine each file name for the pattern “C” followed by 4 numerics, example (dog-C0001-20240101)
 
Step 2
If file name in Folder 1 matches this pattern then move the file to Folder 2  
 
I have the same question (0)
  • Suggested answer
    eetuRobo Profile Picture
    4,401 Super User 2026 Season 1 on at
    First use Get files in folder -action to get all files from Folder 1. You can have it retrieve only files that contain character c in them with *c*. 
    Then loop those files to check if they have the pattern you want. You can use Parse Text and regular expression in that.
    Regular expression for the pattern C followed by 4 digits: C\d{4}
    Then if no match was found don't move file but just go to the next loop. If match was found then use Move file(s) to move the currently looped file to Folder 2.

    For example:
    Highlighted has the correct pattern so those would be moved to folder two:


    Flow:


    result in folder two:


    Folder 1 has only the 4 files left that did not match C + 4 digits:

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 124 Super User 2026 Season 1

#2
Ellis Karim Profile Picture

Ellis Karim 52 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 47 Most Valuable Professional

Last 30 days Overall leaderboard