Forum Discussion
SharePoint Migration Tool - multiple subfolders
Don't know if it helps but I successfully migrated documents from subfolder (i.e. folder/subfolder) level to the folder level in SPO.
The syntax for the source subfolder - 3rd column in CSV - was: foldername/subfoldername. The destination in my case was the folder name - 6th column in CSV: foldername.
It did not work at first but that had other reasons. SPMT was not able to create the destination structure of content types and fields. I found errors in the migration log. So it might be worth checking the log file. The solution for me was to create the destination structure using PnP provisioning so that SPMT didn't have to do this job anymore.
I can confirm similar setup works.
Re: You cannot migrate to a deeper destination than first sub-folder
It is possible to copy to a sub level folder, simply create the task as a teams or sharepoint option (they both create the same job for the output json with only the 'TargetListRelativePath' being slightly different as teams, can select first sub folder in the UI, share point can only select the top level group in UI), then save as json, edit like the below and reload into the tool and run!
{
"Tasks": [
{
"SourcePath": "C:\\Path\\to\\Location",
"TargetPath": "https://mycompany.sharepoint.com/sites/MySite",
"TargetList": "Documents",
"TargetListRelativePath": "General/TopLevelFolder/SubLevelFolder1/SubLevelFolder2",
"Settings": {
"DefaultPackageFileCount": 0,
"MigrateSiteSettings": 0,
"MigrateRootFolder": true
}
}
]
}