Post

GPO Backup Fails - Path Too Long

GPO Backup Fails - Path Too Long

GPO Backup Fails - Path Too Long

Error:
GPO: ..Failed

The-overall eror was The system cannot find the path specified
Additional details to follow.

[Error] The task cannot be completed.
There was an eror with extension [Registry] The \sysvoI\Policies
\4DE1AAE7-BE73-41B8-806A-F1 1661E66A)\Machine\registry.pol] cannot be accessed
The following eror occured
The system cannot find the path specified

Solution:

Windows (by default) limits full file paths to 260 characters (MAX_PATH). This includes the drive letter, colon, backslashes, folder names, and the file name itself.
So, if you’re extracting or copying GPOs (or any files) into a folder structure that’s already deeply nested—especially under something like:
C:\Users\YourUser\Documents\SomeLongFolderName\AnotherLongSubfolder\..\..\registry.pol

-it can exceed the limit, causing “The system cannot find the path specified” errors, even though the file does exist.

Why this impacts GPOs:

  • SYSVOL paths are already long: \domain\SYSVOL\domain\Policies\{GUID}\Machine\Staging\registry.pol
  • If you extract or manipulate GPO backups from compressed files into deep folder structures in Explorer, the full path might exceed the limit.

Fixes and Workarounds:

1. Enable Long Path Support (Windows 10/Server 2016+)

You can lift the 260-character limit:

  • Open gpedit.msc
  • Go to:
    Local Computer Policy > Computer Configuration > Administrative Templates > System > Filesystem
  • Enable “Enable Win32 long paths”

Or set this in the registry:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]

“LongPathsEnabled”=dword:00000001

2. Extract Files Closer to Root

Instead of extracting to:

C:\Users\YourName\Documents\Deep\Folder\Structure\..

Try extracting directly to:

C:\Temp

3. Use PowerShell with UNC or Shortened Paths

You can use tools like robocopy, xcopy, or PowerShell to manipulate paths even beyond 260 characters by prepending with \?\:

1
Copy-Item "\\?\C:\Very\Long\Path\To\File.txt" -Destination "\\?\C:\Shorter\Path"
This post is licensed under CC BY 4.0 by the author.