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

Move folders from sharepoint to sharepoint using jokers

Hello,

 

just challenging a probably simple issue:

 

MS Flow collects daily e-mail-attachements in a sharepoint, creating folders like '2018-07-01', '2018-07-02' and so on. After a few weeks, a pretty long list of folders can be seen in my sharepoint. This is more and more confusing.

So my goal was to copy older folders on a regular basis to an additional folder called 'Archive' and delete the copied folder afterwards. Perhaps, this was too oldschool, these features semm not to be implented in MS Flow.

So, I took a detour copying the e-mail-attachements in the folders mentiones above and directly into the folder 'Archive'. This works, but I have to get rid of the old folders.

Perhaps it is possible to move the folders, so I created a folder called 'Trash' und tried to move the old folders to it.

This works when I directly address the folders name, but when I try to user jokers like '?' or '*', an error is returned:

 

BadGateway.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I tried to use 'concat' adding the question marks to the folder path in the step 'Move folder' like this:

 

Concat.png

 

 

 

 

 

 

 

 

 

 

 

 

 

The example above ist with '-??' it doesn't work with '-*' either.

 

Do you have an idea how to use jokers in this action to copy the whole month july - '2018-07-*'??

 

Thanks in Advance,

 

Goodmountain

2 REPLIES 2
Community Support Team
Community Support Team

Re: Move folders from sharepoint to sharepoint using jokers

Hi @Goodmountain,

 

I am afraid it is impossible to use the jokers like '?' or '*' matching date to determine the folder name to move.

The content filled in the Move to folder must be able to determine the name of the folder. Obviously, using your method, the final directory name is invalid or does not exist.

Maybe you could consider creating an array to store all the days of a month to it, then traversing the array and populating the date (folder name) in the Move to folder.

You could refer to the method provided by v-xida-msft in this link to get all the dates in a month. Then store them in an array and traverse the array via Apply_to_each.

https://powerusers.microsoft.com/t5/Building-Flows/Dates-between-two-dates/td-p/73128

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Goodmountain
Level: Powered On

Re: Move folders from sharepoint to sharepoint using jokers

Hi Barry,

 

that sounds interesting, I will check in quiet minute - thanks a lot!

 

Best regards,

 

Goodmountain

 

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Coming Soon: T-shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

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

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors
Users online (6,372)