How to Copy Files with Long Paths in Windows

Windows has a historical path length limit of 260 characters (known as MAX_PATH). When a file path - including the drive letter, all folder names, and the filename - exceeds this limit, many copy tools fail with errors like "The file name is too long" or "Cannot find the path specified."

TeraCopy handles this out of the box with no Windows configuration required.

Copy long-path files with TeraCopy

TeraCopy uses the Unicode long-path prefix (\\?\) internally, which bypasses the 260-character MAX_PATH limit entirely. No registry edits or Group Policy changes are needed:

  • Paths longer than 260 characters are copied without errors.
  • Long filenames are preserved exactly as-is at the destination.
  • Shell extension works normally - right-click any file or folder to add it to TeraCopy regardless of path length.

Enable long path support system-wide (optional)

If you also need other applications - Explorer, the command prompt, scripts - to access these files after copying, you can enable long path support at the OS level. This is optional for TeraCopy itself.

Option 1: Group Policy (Windows 10 Pro / Enterprise)

  1. Press Win + R, type gpedit.msc, and press Enter.
  2. Navigate to Local Computer Policy → Computer Configuration → Administrative Templates → System → Filesystem.
  3. Open Enable Win32 long paths and set it to Enabled.
  4. Click OK and restart your PC.

Option 2: Registry editor (all Windows 10/11 editions)

  1. Press Win + R, type regedit, and press Enter.
  2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem.
  3. Double-click LongPathsEnabled and set the value to 1.
  4. Click OK and restart your PC.

Option 3: PowerShell (one command)

Open PowerShell as Administrator and run:

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1

Restart your PC for the change to take effect.

When is this useful?

  • Development projects - deeply nested node_modules or Maven/Gradle dependency trees frequently exceed 260 characters.
  • Migrating archives from Linux or macOS - paths that are valid on those systems often exceed the Windows limit.
  • SharePoint and OneDrive sync - cloud-synced folders with long display names can push file paths over the limit.
  • Legal and medical document storage - descriptive folder hierarchies with long names quickly reach the limit.

Frequently asked questions

Do I need to change anything in Windows before using TeraCopy with long paths?

No. TeraCopy uses the \\?\ prefix internally and does not rely on the Windows long path policy. Just copy as normal.

What is the maximum path length Windows supports after enabling long paths?

With long path support enabled, Windows allows paths up to approximately 32,767 characters. In practice, this is more than enough for any real-world folder structure.

Does enabling long paths affect other applications?

It can. Older applications that are not designed for long paths may behave unexpectedly with the setting enabled. Modern apps - including TeraCopy, Visual Studio Code, and most developer tools - work correctly either way.

What if I can't change Windows settings on a corporate machine?

You don't need to for TeraCopy. If other tools on the same machine are failing on long paths, consider shortening the folder structure at the source, or moving files to a shorter root path (e.g. C:\Work\ instead of C:\Users\name\Documents\Projects\).