cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Move folder (with large files and subfolders) from 1 site to another site (within the same tenant)

Hello everyone,

 

Hope you are more experienced on this topic than me 😅

 

My situation:

I have the following situation: there is a specific folder in a sharepoint site (group) that can contain multiple folders and/or files. Those files can be large (2 GB). In the flow I can get the ID and ItemId of the folder (by using 'Get folder metadata using path').

 

What I want to do:

What I want is to move the folder with it's contents (small + large files + maybe folders with files in them) to another Sharepoint site.

 

Different methods to do that (as far as I know):

I can do that with different methods, I've already done some research:

1. Move folder

2. Copy folder (and delete old folder/files)

3. Create files (in new folder) + delete old folder/files - but then I miss creating the subfolders?

4. Copy files (in new folder) + delete old folder/files - but then I miss copying the subfolders?

5. Move folders/files with HTTP request

 

I got errors trying method 1 and 3:

I had different errors when testing with some of the above methods (1 and 3, I did not test 2, 4 and 5 yet). Most of them had to do with filesize. I stopped to look into other errors (such as: Missing or mismatched field definition on the destination list for source field of Failed to verify the existence of destination location) for now, because I first want to know which method is the most reliable one for copying/creating/moving large files (such as files that are 2 GB in size).

 

So I started to dig into that, but I couldn't find an overview of limitations using these methods. Spent quite some time trying to find the information in pieces, but I'm starting to drown 😵.

 

My question:

Can somebody tell me if it is possible moving folders (with large files of 2 GB + subfolders)? And which method can I use best?

 

Thanks a lot in advance 🙏

 

Femke

1 ACCEPTED SOLUTION

Accepted Solutions

Update: I got some great help with the errors that I encountered earlier and now it works! We've tested it with files (20 GB, 1 GB, 2 GB, 5 GB, 500 MB and 12 GB in one folder with subfolders) and everything went smoothly (even with these numbers and large files) with just the action 'move folder'...

 

Sometimes you have to work very hard for a simple solution 🙈

View solution in original post

12 REPLIES 12
fchopo
Super User
Super User

Hi Femke,

Honestly, I would recommend using other tools different than Power Automate, as you will probably hit throttling limits (file size, number of requests).

Options:

1) Use 3rd party tools like ShareGate.

2) Use OneDrive for Business to sync docs with your laptop: Sync SharePoint and Teams files with your computer - Microsoft Support

Steps:

1) Sync source SharePoint doc library with your laptop (OneDrive for Business)

2) Sync new SharePoint doc library with your laptop (OneDrive for Business)

3) Move items from 1 to 2

Hope it helps!

Ferran

 

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

Hi @fchopo ,

 

Thank you for your reply (and time and effort), but my wish to move a folder is not a 1 time thing. It is part of an existing flow (maybe I did not explain that well enough, I'm sorry 🙈). This flow runs several times a day.

 

OneDrive is not relevant I guess?

 

Extra info: I currently use the 'upload file' in Forms, but that has a limitation of max. 10 files of 1 GB each. We are now experiencing trouble with that, that is why I'm searching a different way of doing things.

 

The test flow does this now:

- One person submits a form (and asks for a personal folder)

- When the form is submitted, the flow will create a folder on a SP site that exists for this purpose only (not my OD)

- The folder gets a name with the employee-number of the responder of the form (+date & time) - so is unique

- The responder gets edit control over the folder

- The responder uploads folders and files in this personal folder

- After 1 hour, edit control is removed

- A group of people get view control over the folder

- An approval is send to the group of people (are they happy with the content?)

- After everyone of the group approved, the folder with the contents must be moved to a different site

- Nobody of that group has any access whatsoever to that different site (but other people have)

 

And here I get stuck, because I've reached some limits with the above methods as well. So, maybe I can get the information about limitations ahead, before I go and try all the different options (and resolve different errors etc.) 😊

 

Femke

fchopo
Super User
Super User

Hi @Femke1 

I would definitely try to move objects using "Send an HTTP Request to SharePoint". Here you can find an excellent article on how to do that: Cross-site collection file copy with SharePoint Online REST APIs in Microsoft Flow.md · GitHub

Honestly, I haven't tried copying an entire folder instead of a specific file (as it's shown in the sample).

Hope that helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

 Hi @fchopo ,

 

Thanks again for your reply and help. This is one of the articles that I've come across during my research 🥳

 

Do you maybe have information about the limitations? What did you mean by 'you will probably hit throttling limits (file size, number of requests)'?

 

In the meantime, I think I'm going to go ahead and try that method (HTTP request). Thanks again 🙏

fchopo
Super User
Super User

Hi @Femke1 

When I talk about throttling limits I refer to those: Limits of automated, scheduled, and instant flows - Power Automate | Microsoft Learn

 

Regarding SharePoint, there are some limitations: SharePoint - Connectors | Microsoft Learn

 

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

Thank you for the links!

 

I'm trying to replicate what zplume did in his article (so I can accept your answer as solution), but I keep getting errors:

 

Femke1_0-1701245529137.png

 

Do you have a clue? I'm not getting anywhere 🙈. I'm going to built my replica again I guess 🙂

fchopo
Super User
Super User

Could you share the error you get when running the workflow?

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

It's the error in the screenshot. It doesn't give me more error details, cause there is an action in the beginning of the flow that gives an error (it errors if I'm not a certain person - which I'm not, so I gave the next action a 'configure run after' and ticked all the boxes) and those error details are shown...

 

So I can only tell you this:

- In the Apply to each loop (Wait for copy job to complete'): ActionFailed. An action failed. No dependent actions succeeded.

- In the HTTP request to SP 'GetCopyJobProgress': BadRequest.

 

Hope this helps? I don't know a way to get the error details of a particular action?

Been doing other stuff, but I'm back now trying to resolve this. I did find more details 🙂

 

In the body of the inputs of GetCopyJobProgress I can see this:

{
"copyJobInfo": {
"EncryptionKey": "zZLYtnSxP8FPM4M1+SOQNKei2alHgg3PvSsUrdRPgzM=",
"JobId": "ae3132c0-ec9c-4f12-ae6f-289c20694ba7",
"JobQueueUri": "https://spodb1am1m006p3.queue.core.windows.net/3-2553-20231220-afa8aceae18341688f251809621caab4?sv=2...",
"SourceListItemUniqueIds": []
}
}

 

In the body of the outputs of GetCopyJobProgress I can see this:

{
  "status": 400,
  "message": "{\"odata.error\":{\"code\":\"-1, Microsoft.Data.OData.ODataException\",\"message\":{\"lang\":\"en-US\",\"value\":\"A node of type 'StartArray' was read from the JSON reader when trying to read a value of a property; however, a 'PrimitiveValue' or 'StartObject' node was expected.\"}}}\r\nclientRequestId: b27c9c6b-3b66-4287-9b8b-ddd0e06688ee\r\nserviceRequestId: b8c4f2a0-f00d-7000-a6ee-873009dda23a",
  "errors": []
}

 

I see that SourceListItemUniqueIds is empty, and in the comments I see Reza Dorrani saying something about the SourceListItemsUniqueIds.

 

I think I'm going to rebuilt a test flow from scratch and dive back in to this topic.

 

Any help is welcome 🙏 😉

Update: I got some great help with the errors that I encountered earlier and now it works! We've tested it with files (20 GB, 1 GB, 2 GB, 5 GB, 500 MB and 12 GB in one folder with subfolders) and everything went smoothly (even with these numbers and large files) with just the action 'move folder'...

 

Sometimes you have to work very hard for a simple solution 🙈

Hi Femke1,

 

What was your solution? I am having similar troubles and would love some help.

Hi @szaj ,

 

For me the Sharepoint action 'Move folder' worked just fine after solving some errors. I don't actually remember what I solved, but I remember it was quite easy after I took a good look at it.

 

First use 'Get folder metadata using path':

Femke1_1-1720534547868.png

 

 

Good luck! 💪

 

Femke

 

 

 

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages