There are a number of limitations for the length of the folder names and filename when migrating to SharePoint.

Microsoft article that describes the limitations

To overcome this, you can choose to automatically shorten the path and filename to fit within SharePoint. The actual path and filename before shortening is preset in the normal columns and can be assigned to any metadata column.
Also, in the database view Report_MigratedFiles the column shortenedpathname reflects the status for if the path or filename was in fact shortened or not. (1=Shortened, 0= Not shortened)

Note that the shortening happens after the transformations and therefore also works for custom naming.

Last modified: 4 October 2023