Hi anonymous userenPinca-1646
Per my test, I didn’t find out why SharePoint Migration Tool creates multiple duplicated folders. But you can check folder size in Storage Metrics.
Please follow the steps below:
Site Information > View all site settings > Site Collection Administration > Storage Metrics
And you can use PowerShell to check folder size.
PowerShell codes:
#Function to Get the size of a Folder in SharePoint Online
Function Get-SPOFolderSize([Microsoft.SharePoint.Client.Folder]$Folder)
{
Try
{
#Get all Files and Subfolders from the folder
$Ctx.Load($Folder.Files)
$Ctx.Load($Folder.Folders)
$Ctx.ExecuteQuery()
$FolderSize = 0
ForEach($File in $Folder.Files | Where {-Not($_.Name.EndsWith(".aspx"))})
{
#Get File versions
$Ctx.Load($File.Versions)
$Ctx.ExecuteQuery()
$VersionSize=0
If($File.Versions.Count -ge 1)
{
#Calculate Version Size
$VersionSize = $File.Versions | Measure-Object -Property Size -Sum | Select-Object -expand Sum
}
$FileSize = [Math]::Round((($File.Length) + $VersionSize)/1KB, 2)
If($FileSize -gt 0)
{
Write-host "`tSize of the File '$($File.Name)' "$FileSize
}
#Get File Size
$FolderSize += $FileSize
}
If($FolderSize -gt 0)
{
Write-host -f Yellow "Total Size of the Folder '$($Folder.ServerRelativeUrl)' (KB): " -NoNewline
$FolderSize= [Math]::Round($FolderSize/1KB, 2)
Write-host $FolderSize
}
#Process all Sub Folders
ForEach($Folder in $Folder.Folders | Where {-Not($_.Name.StartsWith("_") -or $_.Name -eq "Forms")})
{
#Call the function recursively
Get-SPOFolderSize $Folder
}
}
Catch [System.Exception]
{
Write-Host -f Red "Error:"$_.Exception.Message
}
}
#parameters
$SiteURL = "https://tenant-admin.sharepoint.com/"
#Get credentials to connect to SharePoint Online Admin Center
$Cred = Get-Credential
#Set up the context
$Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
$Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password)
#Get the Web
$Web = $Ctx.Web
$RootFolder = $Web.RootFolder
$Ctx.Load($RootFolder)
$Ctx.ExecuteQuery()
#Call the function to get Subsite size
Get-SPOFolderSize -Folder $RootFolder
For Reference:
https://www.sharepointdiary.com/2018/06/sharepoint-online-get-folder-size-using-powershell.html
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.