Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Filing documents in similar name folders (efficiency)

(0) ShareShare
ReportReport
Posted on by 2

Hi

I hope you can suggest an alternative approach for this problem, as what I have created is ridiculously inefficient.

 

I have a folder (in SharePoint) of files (Word documents) with employee names in the filename.  I want to automate the placement of these files in their staff folder (also in SharePoint).  Unfortunately, the folders may or may not match exactly the names in the document - for example, "Surname Firstname" or "Firstname Surname", and this list is managed by others.

 

  1. The workflow I made gets the contents of the Staff Folder and filters the array for IsFolder?.
  2. For each of these folders, an Apply to Each separates the Folder name into two strings (the first and last words)
  3. Within this Apply to Each, each document filename is searched for both strings
  4. If there is an AND match, some additional elements check if the correct SubFolder has been made and moves/copies the file to the correct SubFolder.
  5. If there is no match, the flow ends.

There are probably too many loops within the Apply to Each's which are taking the time, but this takes hours and hours for 125 files.

 

Thanks for any alternative approaches.

Mike

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow