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 / Filing documents in si...
Power Automate
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

Categories:
I have the same question (0)

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard