Avatar of al4629740
al4629740
Flag for United States of America asked on

File count over limit in MS 365 when copying

I am trying to copy files of a user who is no longer with us to an archive folder in Sharepoint.  I am doing it from their Onedrive account and trying to do folder copies direct to sharepoing.  However I get this error a lot.  Is there an easier way to copy files over to Sharepoint?



Microsoft 365Microsoft SharePointOneDrive

Avatar of undefined
Last Comment
al4629740

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Vasil Michev (MVP)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
DEMAN-BARCELO (MVP) Thierry

The number of files and the size of files can limit or block this operatio:n.

You can transfert to or from Onedrive to Sharepoint by Powershell script, but the limit there is 50 MB.

I had to develop a specific script to manage that problem, downloading locally the biggest files, and uploading these files.
Because, the moving were too often blocked and not finished.

This kind of script uses the CSOM library and the Microsoft.SharePoint.Client:

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/complete-basic-operations-using-sharepoint-client-library-code

Here is a little part of my sample script :

#sharepoint online powershell to move files
          $MoveCopyOpt = New-Object Microsoft.SharePoint.Client.MoveCopyOptions
          $Overwrite = $True
          [Microsoft.SharePoint.Client.MoveCopyUtil]::MoveFile($LocalCtx, $SourceURL, $TargetURL, $Overwrite, $MoveCopyOpt)
          $LocalCtx.ExecuteQuery()

If necessary, I can give you a link to the full script.
al4629740

ASKER
Is the script limited by 50MB also.  Thats super low...
al4629740

ASKER
So it would seem that just downloading their OneDrive and then uploading it sometimes might be the only option.  I thought maybe there was a tool in 365 that could be used.
Your help has saved me hundreds of hours of internet surfing.
fblack61