cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Alex_AR
Level: Powered On

Sharepoint-Moving files created with flow each Monday at 8am of every week and moving them to specific folder

I have two flows currently running. 

 

  1. The first flow creates a file based on a template every first monday of the week and names it as follow weekly_tasks_yyyy-MM-dd. The date at the end of the file name is automatically generated and is the date the file is created.
  2. I have another flow that creates a folder every 1st of the month and the name format is yyyy-MM

I am having hard time creating a flow that will move the files created weekly to the correct folder automatically. for example

a total of 4 files are created in January, each file is moved automatically to the January the day it is created. Lets say there are 4 Mondays in January and at the end of the month the January folder will contain all 4 files created during that month.  the process repeats itself for each month. 

 

if anyone can point me in the right direction it would be greatly appreciated. 

 

 

6 REPLIES 6
Dual Super User
Dual Super User

Re: Moving files created with flow each Monday at 8am of every week and moving them to specific folder

Sharepoint?



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Alex_AR
Level: Powered On

Re: Moving files created with flow each Monday at 8am of every week and moving them to specific folder

In sharepoint yes, thanks 

Dual Super User
Dual Super User

Re: Moving files created with flow each Monday at 8am of every week and moving them to specific folder

Hi again

And the new files (i.e. the ones not moved yet) are stored in the same source library, right?

If so, you can use the flow to be executed 1st of February 2020 to move 2020 January files to 'January' folder.

 

First you get all files on Source Library by means of SP Get Files (properties only). This action will give you a bunch of properties per file, one of them its ID.

Then you add a Filter Array to get the ones whose name contains the pattern you are looking for (2020-01)

Once you filter them, you add an Apply to each, its input will be filter output.

Inside the Apply to Each, you should invoke Move File action block

 

There are other approaches: for example, instead of using filter array, you can use a condition inside the Apply to Each, as explained in this thread

 

Hope this helps

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Alex_AR
Level: Powered On

Re: Moving files created with flow each Monday at 8am of every week and moving them to specific folder

Yes, the files created are stored under a template in a document library. The old process was manual for both the renaming of the files and the creation of folders. You solution will work for sure but I am trying to make it even more organized by providing monthly folders where the files are generated. I have a team of engineers that report their weekly accomplishments every Monday for the previous week and it would be nice if they can go into the correct folder month and have the file ready for them to be populated. 

Dual Super User
Dual Super User

Re: Moving files created with flow each Monday at 8am of every week and moving them to specific folder

Hi again
Not sure I understood properly.
What are you missing in my suggestion?
Thanx!


Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Alex_AR
Level: Powered On

Re: Sharepoint-Moving files created with flow each Monday at 8am of every week and moving them to specific folder

I misunderstood you, I thought your suggestion will run at the end of every month and move the files into the correct folders. You were just talking about the January files. Currently I have a flow that moves the file into the January folder but it's a static one meaning it does not account for future folders created. I will try your suggestion and if I run into a bump I'll let you know. I am new to flow but I am learning. Thank you again for your help. 

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,464)