cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
overhead_press2
Frequent Visitor

Prevent files from duplicating when automatically moving them into folders

I am building a flow that is connected to my Sharepoint, below are screenshots of the functionality and my current problem:

 

The idea is that I am going to drop a bunch of files into the SharePoint folder, in this case I dropped two 

1.jpg

Then the flow will automatically generate a bunch of folders based on the beginning of the file names and place them into the corresponding folders.

2.png

Below are the two folders that are created from dropping the two files. The issue I am experiencing is that all the files are being duplicated in each of the folders when there should only be one file in each of the folders that has the matching name:

4.png

3.png

 

What is wrong with my flow below and how can I change it so that only the correct file shows in each of the folders? (Ex. file "J0000-1002_.......PDF" only shows in folder "J0000-1002". Thanks in advance! 

11.png

12.png

13.png

 Let me know if you need clarification on the flow, thanks! 

2 REPLIES 2
PrasadAthalye
Community Champion
Community Champion

Can you check if you flow is running multiple times in Flow Run history?  I see that you are creating a file from the flow and the flow is set to run on a file creation trigger.

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

I checked and it is only running once, I suspect it could be a problem with using Apply to Each? 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,581)