Forum Discussion
FabvE
Dec 09, 2024Brass Contributor
SharePoint Migration Tool after failed copying
Hi, a user tried to migrate a local storage to SharePoint Online. He set up a sync between his Windows Explorer and the SharePoint library and did a plain copy of all folders & files from the networ...
HaidariHammad
Dec 11, 2024Brass Contributor
If items are already modified/newer in SharePoint Online, you have a few options:
Third party tools could be the easiest option as it has built-in "Copy if newer (incremental)" feature that preserves newer versions at the destination while migrating missing content.
If you don't want to purchase third party tools, you can achieve the same functionality using PowerShell with PnP module The PowerShell solution will:
- Compare file timestamps between source and destination
- Only copy files missing from SharePoint
- Only update files that are older in SharePoint
- Skip files that are newer in SharePoint
- Maintain full folder structure
To use this script:
Modify these parameters in the script:
- SourcePath: Your network share path
- SharePointSiteUrl: Your SharePoint site URL
- LibraryName: Your document library name
- WhatIf: Set to $false to perform actual copy
- BatchSize: Adjust based on your needs (lower for slower connections)
- Run the script as Administrator:
.\SharePoint-IncrementalSync.ps1
This way you can protect the work already done in SharePoint while completing the migration of remaining content from your network drive. Let me know if you'd like me to provide the PowerShell script.
Hope this helps!