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 / 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,204 Super User 2025 Season 2 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

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard