cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nsoria
New Member

Copy a Sharepoint and rename a file into folders for future dates

I have been using a PowerShell script to copy a template Excel file, rename it for each week and place it into folders based on date.

So we'd copy Template.xlsx, punch in the number of months out you want it created for, and it would copy the files for each week into folders like : ../2020/July/Week of 26th.xlsx

Is there a way to use Microsoft flow to do something similar on Sharepoint?  For example, make a new copy of the template for the next week on Sundays?  Or generate them all for the next month a month ahead of time?

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @nsoria,

 

Yes, it is possible to do it by using recurrence trigger to make it runs every Sunday:

add(div(dayOfYear(utcNow()),7),1)
utcNow('yyyy/MMMM')

Annotation 2020-07-30 103451.jpg

 

Annotation 2020-07-30 103452.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
v-litu-msft
Community Support
Community Support

Hi @nsoria,

 

Yes, it is possible to do it by using recurrence trigger to make it runs every Sunday:

add(div(dayOfYear(utcNow()),7),1)
utcNow('yyyy/MMMM')

Annotation 2020-07-30 103451.jpg

 

Annotation 2020-07-30 103452.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

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.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,044)