Skip to main content

Notifications

Power Automate - Power Automate Desktop
Suggested answer

Moving specific files from one folder to another

(0) ShareShare
ReportReport
Posted on by 24
  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  
 
Categories:
  • Suggested answer
    eetuRobo Profile Picture
    eetuRobo 2,450 on at
    Moving specific files from one folder to another
    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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,867

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,174

Leaderboard