When you run the SharePoint Migration Tool, some files may be skipped without any clear error. This happens because Windows has a 260-character path limit that the tool enforces by default. Files with paths longer than 260 characters are not moved to SharePoint or OneDrive. This article explains why the tool skips these files and how to fix the issue using registry edits and SPMT settings.
Key Takeaways: Fix Long Path Skipping in SharePoint Migration Tool
- Windows Registry > Enable Long Paths: Modify the registry key to allow paths longer than 260 characters on the source computer.
- SPMT Settings > Long File Path Support: Enable the setting in SPMT to include files with paths over 260 characters during migration.
- Group Policy > Long Paths: Use Group Policy to enable long path support across multiple machines in an enterprise.
Why the SharePoint Migration Tool Skips Long Path Files
The SharePoint Migration Tool uses the Windows API to read files. By default, Windows limits file paths to 260 characters. This limit includes the drive letter, colon, backslash, folders, and file name. Any file with a path longer than 260 characters is invisible to the migration tool, so it is skipped.
This limit exists in the Win32 API, which many applications use. Microsoft introduced a registry setting in Windows 10 version 1607 and Windows 11 to disable this limit. The setting is not enabled by default. When the limit is active, the SharePoint Migration Tool cannot access the file, and the migration log shows a skip entry with no error code.
How Long Paths Affect SharePoint Migration
SharePoint itself supports paths up to 400 characters. But the migration tool runs on the source machine with the Windows limit. Even if SharePoint can store the file, the tool cannot read it from the source. This mismatch causes files to be skipped silently. The migration report shows the file as skipped, but does not always explain why.
Steps to Enable Long Path Support on the Source Computer
To fix this issue, you must enable long path support on the Windows computer where the SharePoint Migration Tool runs. There are two methods: editing the registry directly or using Group Policy. Both methods require administrator rights.
Method 1: Edit the Windows Registry
- Open Registry Editor
Press Windows + R, typeregedit, and press Enter. If prompted by User Account Control, click Yes. - Navigate to the Long Paths Key
Go toHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem. - Modify the LongPathsEnabled Value
Double-clickLongPathsEnabled. If the value does not exist, right-click in the right pane, select New > DWORD (32-bit) Value, and name itLongPathsEnabled. Set the value data to1and click OK. - Restart the Computer
Close Registry Editor and restart the computer for the change to take effect.
Method 2: Use Group Policy
- Open Local Group Policy Editor
Press Windows + R, typegpedit.msc, and press Enter. - Navigate to File System Policy
Go to Computer Configuration > Administrative Templates > System > Filesystem. - Enable Win32 Long Paths
Double-clickEnable Win32 long paths. Select Enabled and click OK. - Restart the Computer
Close Group Policy Editor and restart the computer.
Configure SharePoint Migration Tool to Use Long Paths
After enabling long path support in Windows, you must also configure the SharePoint Migration Tool to include long path files.
- Open SharePoint Migration Tool
Launch SPMT from the Start menu or the Microsoft 365 admin center. - Start a New Migration
Click Start and choose your source and destination. - Open Advanced Settings
In the migration setup screen, click Advanced Settings. - Enable Long File Path Support
Scroll to the Long file path support section. Set the toggle to On. This tells SPMT to include files with paths longer than 260 characters. - Run the Migration
Click Start to begin the migration. SPMT will now process long path files.
If Files Are Still Skipped After the Fix
Even after enabling long path support, some files may still be skipped. Here are the most common reasons and how to fix them.
SharePoint Path Limit Exceeded
SharePoint supports paths up to 400 characters. If the source file path is longer than 400 characters, SharePoint will reject it. Shorten the folder structure on the source before migrating. Rename deeply nested folders to reduce total path length.
File Name Contains Invalid Characters
SharePoint does not allow certain characters in file names: " : < > ? / \ |. If a file name contains any of these, the migration tool skips it. Rename the files on the source before starting the migration.
Migration Tool Version Is Outdated
Older versions of SPMT may not have the long file path support setting. Download the latest version from the Microsoft 365 admin center. Go to Migration > SharePoint Migration Tool > Download.
SPMT Settings Comparison: Default vs. Long Path Enabled
| Item | Default Setting | Long Path Enabled |
|---|---|---|
| File path limit | 260 characters | Up to 32,767 characters (Windows limit) |
| Registry change needed | No | Yes, LongPathsEnabled = 1 |
| SPMT setting | Off | On in Advanced Settings |
| Files skipped | All files with paths over 260 characters | Only files with paths over 400 characters or invalid names |
| Restart required | No | Yes, after registry change |
The SharePoint Migration Tool skips long path files because Windows enforces a 260-character path limit by default. You can fix this by enabling the LongPathsEnabled registry key and turning on the long file path support setting in SPMT. After these changes, the tool will migrate files with paths longer than 260 characters, though SharePoint still enforces a 400-character limit. For enterprise environments, use Group Policy to apply the registry change to multiple computers at once. Always check the migration log for skipped files after the fix to confirm no other issues remain.