With Windows 10 from build 14352 and with Windows 11, Microsoft has made it possible to override the maximum path length of 260.
Windows checks whether the path length is adhered to when files are created in drives. This problem can still occur if you move folders with substructures or work via mapped drives, because the check does not take place in this case or from the mapped drive onwards.
As of Windows 10 from build 14352 and with Windows 11, you can work around this using Group Policy and allow long file names.
Group policy configuration
In the Group Policy Editor, you can activate long Win32 paths via Computer Configuration – Administrative Templates – System – File System – NTFS.
Once Win32 paths are enabled, manifested Win32 applications and Windows Store applications on file systems that support it can access paths that exceed the normal path length of 260 characters. If this setting is enabled, the long paths are also accessible within the process.
Configuration via the registry to enable a path lenght over 260 characters
This value can also be configured in the registry. The appropriate registry key can be found under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\
Important note
This enables path length over 260 characters support for Win32 applications and Windows Store applications. There is no guarantee that this will work for third-party applications. I recommend to reduce the length of paths to 250 and this can be controlled e.g. with the tool TLPD. I would ignore the virus warnings for the tool, as this unfortunately happens more often with AutoIT-based tools. However, you can also do this with Powershell.
Get-ChildItem -Recurse -Force -ErrorAction SilentlyContinue | Where-Object {$_.FullName.Length -gt 250}
More tools i.e. a free Microsoft tool to use one mouse and keyboard on two PC’s, can be found here. A German version can be found here.