---
title: "Addressing the Windows Error: Destination Path Too Long"
description: "Fix the Windows “Destination Path Too Long” error effortlessly with smart strategies, and master file management in this tutorial!"
canonical: "https://adamtheautomator.com/destination-path-too-long/"
---

# Addressing the Windows Error: Destination Path Too Long

> Fix the Windows “Destination Path Too Long” error effortlessly with smart strategies, and master file management in this tutorial!

Source: https://adamtheautomator.com/destination-path-too-long/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Addressing the Windows Error: Destination Path Too Long](https://adamtheautomator.com/wp-content/uploads/2023/12/destination-path-too-long.jpg)

# Addressing the Windows Error: Destination Path Too Long

[![](https://secure.gravatar.com/avatar/3af64110e538c07a01fd9f0782f700ce6ed2d798bbf7b120e299d375eca5b0b3?s=192&d=mm&r=g)Arman Castillote](https://adamtheautomator.com/author/arman-castillote/)18 December 202310 min. read

Categories: [IT Ops](/category/it-ops/)

Tags:[Windows](/tag/windows/)

Table of Contents

*   [Prerequisites](#prerequisites)
*   [Demystifying the “Destination Path Too Long” Error](#demystifying-the-destination-path-too-long-error)
*   [Reducing the File Path Length by Renaming the Parent Folder](#reducing-the-file-path-length-by-renaming-the-parent-folder)
*   [Performing File Operations on Lengthy File Paths via 7-zip](#performing-file-operations-on-lengthy-file-paths-via-7-zip)
*   [Enabling the Win32 Long Paths Support on Windows](#enabling-the-win32-long-paths-support-on-windows)
*   [Using the Registry Editor](#using-the-registry-editor)
*   [Using the Group Policy Editor (GPE)](#using-the-group-policy-editor-gpe)
*   [Creating Symbolic Links for Long Paths](#creating-symbolic-links-for-long-paths)
*   [Employing the Robocopy Command for File Operations](#employing-the-robocopy-command-for-file-operations)
*   [Leveraging the -LiteralPath Parameter in PowerShell cmdlets](#leveraging-the--literalpath-parameter-in-powershell-cmdlets)
*   [Extracting Archive Files via the Expand-Archive Command](#extracting-archive-files-via-the-expand-archive-command)
*   [Conclusion](#conclusion)

Have you been desperately trying to move or delete a file, only to be met with a frustrating error message that says, “Destination Path Too Long”? This infamous error is more common than you might think, turning the simplest file management tasks into a digital labyrinth.

But fear not! In this tutorial, you’ll learn battle-tested strategies to conquer the “Destination Path Too Long” dilemma.

Now, if you’re tired of feeling like your computer is playing hard to get, stick around to get rid of this pesky Windows error message!

## Prerequisites

Before you conquer the “Destination Path Too Long” error, ensure you’re well-equipped for the journey with the following:

*   A Windows computer – This tutorial uses Windows 10 for demonstrations.
*   PowerShell 5.1 or later – This tutorial uses PowerShell 7.4.0.

Related:[PowerShell 7 Upgrade: A Comprehensive Walkthrough](https://adamtheautomator.com/powershell-7-upgrade/)

*   Administrative permissions.
*   [7-zip installed](https://www.7-zip.org/download.html) – This tutorial uses 7-zip 23.01, the latest version at this time of writing.

## Demystifying the “Destination Path Too Long” Error

This cryptic message, “Destination Path Too Long,” like the one below, often arises from the [MAX\_PATH limit](https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry), a historical constraint deeply ingrained in Windows file systems. The MAX\_PATH limit, set at 260 characters, has been a longstanding challenge for users dealing with deeply nested directories, intricate folder structures, and lengthy filenames.

![](https://adamtheautomator.com/wp-content/uploads/2023/12/image-117.png)

Demonstrating the “Destination Path Too Long” error

Throughout this tutorial, you’ll unravel the intricacies of the MAX\_PATH limit and unveil practical strategies to overcome this limitation.

## Reducing the File Path Length by Renaming the Parent Folder

Imagine your computer suddenly decides to channel its inner Shakespeare and declares, “To move or not to move, that is the question.” But seriously, if you’ve been scratching your head over this Windows hiccup, one of the basic fixes is renaming the parent folder.

Suppose you have a folder (containing important files) with a long name that you wish to move or copy to another location. Renaming the parent folder will help avoid the “Destination Path Too Long” error.

To see how reducing the file path length works, follow these steps:

1\. Locate the folder with the long path, as shown below, where the folder name is a bunch of random letters and numbers.

One of the primary culprits behind this enigmatic message is the [MAX\_PATH limit](https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry) (260 characters) imposed by the Windows OS. This limit stands to maintain compatibility across various applications and systems.

![Locating the folder with a long name](https://adamtheautomator.com/wp-content/uploads/2023/12/image-120.png)

Locating the folder with a long name

2\. Rename the folder name with a shorter one (i.e., _**Backup-01**_).

![Renaming the folder](https://adamtheautomator.com/wp-content/uploads/2023/12/image-119.png)

Renaming the folder

3\. Now, copy or move the renamed folder to your preferred location and see if you still get the “Destination Too Long Error.”

![Copying or moving the renamed folder to a different location](https://adamtheautomator.com/wp-content/uploads/2023/12/image-118.png)

Copying or moving the renamed folder to a different location

## Performing File Operations on Lengthy File Paths via 7-zip

If altering the name of the folder or file isn’t a critical consideration, a quick remedy would be to rename them, which sidesteps the “Destination Path Too Long” error.

But if preserving the existing names is paramount, is there a viable approach without triggering the error? Yes, by leveraging 7-zip, a robust file compression and archiving tool.

To perform file operations on lengthy file paths via 7-zip, complete the steps below:

1\. Launch the 7-zip file manager from your Start menu or desktop shortcut.

2\. Next, locate and right-click on your target file or folder and choose a file operation from the context menu. But in this example, copy the file (**Copy To**) to another location.

Notice that the text file has a ridiculously long file path.

![Locating the target file or folder in 7-zip](https://adamtheautomator.com/wp-content/uploads/2023/12/image-123.png)

Locating the target file or folder in 7-zip

3\. Browse the location of the file’s destination in the dialog box, and click **OK** to confirm copying the file.

7-zip ignores Win32API restrictions on max path lengths, which lets you perform file operations on files and directories.

![Setting the file’s destination](https://adamtheautomator.com/wp-content/uploads/2023/12/image-122.png)

Setting the file’s destination

4\. Lastly, navigate to your target location and verify the file you copied exists.

This outcome confirms you’ve successfully copied the file, bypassing the MAX\_PATH limit via 7-zip.

![Verifying the file copied via 7-zip exists in the target location](https://adamtheautomator.com/wp-content/uploads/2023/12/image-121.png)

Verifying the file copied via 7-zip exists in the target location

## Enabling the Win32 Long Paths Support on Windows

Perhaps you wish to stick with Windows-based solutions instead of relying on third-party tools like 7-zip when dealing with long file paths. If so, enabling the Win32 long paths support on Windows offers a native and integrated approach to overcoming the notorious “Destination Path Too Long” error.

By unlocking Win32 long paths support, you empower your Windows system to handle lengthy file paths gracefully without needing external applications. This feature offers a tailored solution that aligns with your preference for native Windows functionalities.

Read on and explore different methods of enabling the Win32 long paths support.

### Using the Registry Editor

One key avenue for enabling the Win32 long paths support lies in wielding the power of the Registry Editor. This digital control center acts as the beating heart of your Windows system, allowing you to tune settings with precision.

To enable the Win32 long paths support via Registry Editor, proceed with the following:

1\. Open the Run dialog (Win + R), type in **regedit**, and press Enter (or click **OK**) to launch the Registry Editor.

![Launching the Registry Editor via the Run dialog](https://adamtheautomator.com/wp-content/uploads/2023/12/image-126.png)

Launching the Registry Editor via the Run dialog

> 💡 _IMPORTANT: Prior to making any changes in the Registry Editor, [create a backup of the registry](https://support.microsoft.com/en-us/topic/how-to-back-up-and-restore-the-registry-in-windows-855140ad-e318-2a13-2829-d428a2ab0692). This backup is a safeguard, allowing you to restore the registry in case of any complications or unforeseen issues._

2\. Navigate to the following key or paste the key into the address bar to access various settings and configurations related to the file system behavior.

```
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
```

![Accessing settings and configurations related to the file system behavior](https://adamtheautomator.com/wp-content/uploads/2023/12/image-125.png)

Accessing settings and configurations related to the file system behavior

3\. Look for and double-click the **LongPathsEnabled** entry (right-hand pane) to access its associated data and change the **Value data** from **0** to **1**.

This entry tells the system to enable Win32 long paths support.

![Enabling the Win32 long path support via the LongPathEnabled entry in Registry Editor](https://adamtheautomator.com/wp-content/uploads/2023/12/image-124.png)

Enabling the Win32 long path support via the LongPathEnabled entry in Registry Editor

4\. Exit the Registry Editor and reboot your Windows system to apply your changes.

5\. Now, perform file operations like copying or moving files or folders with long file paths to see if you can bypass the “Destination Path Too Long” error.

> 💡 _Unfortunately, at this time of writing, the native File Explorer in Windows 10 and Windows Server 2022 still faces limitations supporting NTFS long paths. If you often work on long file paths in your workflow, there are free third-party file managers you can turn to, like [OneCommander](https://onecommander.com/index.php) and [TotalCommander](https://www.ghisler.com/index.htm)._

### Using the Group Policy Editor (GPE)

Delving into the intricacies of enabling Win32 long paths support unveils a myriad of approaches, and among the most refined is harnessing the GPE. Think of the GPE as your bespoke toolkit for fine-tuning Windows functionalities.

When empowering your system with extended path capabilities, the GPE takes center stage, offering a centralized and systematic method.

To enable the Win32 long paths support via GPE, perform the following:

1\. Open the GPE (**gpedit.msc**) via the Run dialog, as shown below.

The GPE is a Microsoft Management Console (MMC) snap-in that provides a GUI for managing policy settings in Windows.

![Opening the GPE via the Run dialog](https://adamtheautomator.com/wp-content/uploads/2023/12/image-129.png)

Opening the GPE via the Run dialog

2\. Next, initiate enabling the Win32 long path support in the GPE’s main window as follows:

*   Navigate to **Computer Configuration** → **Administrative Templates** → **System** → **Filesystem** in the console tree (left-hand pane). Doing so lets you access the policy settings related to the filesystem.
*   Look for and double-click the **Enable Win32 long paths** policy setting (right-hand pane). A configuration dialog for the selected policy setting appears (step three).

![Accessing the configuration dialog for the “Enable Win32 long paths” policy setting](https://adamtheautomator.com/wp-content/uploads/2023/12/image-128.png)

Accessing the configuration dialog for the “Enable Win32 long paths” policy setting

3\. Subsequently, choose the **Enabled** option in the configuration dialog and click **OK** to enable the Win32 long paths support for Windows.

![Enabling the Win32 long paths support for Windows via GPE](https://adamtheautomator.com/wp-content/uploads/2023/12/image-127.png)

Enabling the Win32 long paths support for Windows via GPE

4\. Now, copy or move files or folders with long file paths to test the Win32 long paths support.

## **Creating Symbolic Links for Long Paths**

Besides enabling the Win32 long paths support, one other option to bypass the constraints of lengthy file paths is creating your digital shortcuts—symbolic links.

Creating a symbolic link is akin to placing a hidden door in your filing cabinet. Open it, and you will find an express lane to your files without compromising the existing structure.

To create symbolic links for long paths, carry out the steps below:

1\. Launch [Command Prompt as administrator](https://www.makeuseof.com/windows-run-command-prompt-admin/), and execute the following `mklink` command to create a directory symbolic link (`/D`) in the specified destination path (i.e., _C:\\folder-link_).

The symbolic link points to your folder with an excessively long path. Thus, replace `<symlink>` with the destination path and `<long-path>` with your long path.

```bash
mklink /D <symlink> <long-path>
```

![Creating a symbolic link for a folder](https://adamtheautomator.com/wp-content/uploads/2023/12/image-132.png)

Creating a symbolic link for a folder

2\. Next, run the below `dir` command to check if your directory symbolic link exists.

```bash
dir <symlink>
```

![Checking if the directory symbolic link exists](https://adamtheautomator.com/wp-content/uploads/2023/12/image-131.png)

Checking if the directory symbolic link exists

3\. Inside your long path folder, create a text file named _symlink.txt_, which serves as proof that your symbolic link works.

> 💡 _This tutorial uses a third-party file manager called [Directory Opus](https://www.gpsoft.com.au/), similar to [XYplorer](https://www.xyplorer.com/index.php). Both are feature-rich file managers designed to enhance the file management experience on Windows._

![Creating a text file to serve as proof that the symbolic link works](https://adamtheautomator.com/wp-content/uploads/2023/12/image-130.png)

Creating a text file to serve as proof that the symbolic link works

4\. Lastly, locate and navigate inside your newly-created directory symbolic link in your file manager to confirm it points to your long path folder.

Now, you can copy or move files to your target folder, disregarding the MAX\_PATH limit.

![Verifying the directory symbolic link points to the long path folder](https://adamtheautomator.com/wp-content/uploads/2023/12/image-1.gif)

Verifying the directory symbolic link points to the long path folder

## Employing the Robocopy Command for File Operations

Perhaps creating a symbolic link is not part of your plan, but you’re looking for a direct file operation, like copying files from and to folders with long file paths. If so, you’ll need [Robocopy](https://adamtheautomator.com/robocopy/), a powerful solution to turn your file transfer woes into a seamless experience.

Related:[Robocopy Commands: Data Migration, Folder Sync, and More](https://adamtheautomator.com/robocopy/)

To perform file operations via the Robocopy command, proceed with these steps:

1\. Open PowerShell as administrator and execute the following commands to declare variables to hold your target file’s source and destination paths.

Related:[Run PowerShell as Administrator: Multiple Methods Explored](https://adamtheautomator.com/powershell-run-as-administrator/)

These commands have no output, but ensure you replace `<source>` and `<destination>` placeholders accordingly.

```powershell
$srcPath=<source>
$destPath=<destination>
```

![Declaring variables to hold the target file’s source and destination paths](https://adamtheautomator.com/wp-content/uploads/2023/12/image-135.png)

Declaring variables to hold the target file’s source and destination paths

2\. Next, run the `robocopy` command below to copy the `symlink.txt` file and all its information (`/COPYALL`) from the source (`$srcPath`) to the destination (`$destPath`).

This command ensures the target file is copied without waiting (`/W:0`) or retrying (`/R:0`) in case of errors during the copy operation.

```powershell
robocopy $srcPath $destPath symlink.txt /COPYALL /W:0 /R:0
```

> _💡 Perhaps you wish to move the file to a different location. If so, replace `/COPYALL` with the `/MOVE` option, as shown below. This option tells `robocopy` to perform a “cut and paste” operation._
> 
> _`robocopy $srcPath $destPath symlink.txt /MOVE /W:0 /R:0`_

The output below confirms that you’ve successfully copied one file regardless of the long path.

![Copying a file via the robocopy command bypassing the MAX\_PATH limit](https://adamtheautomator.com/wp-content/uploads/2023/12/image-134.png)

Copying a file via the `robocopy` command bypassing the MAX\_PATH limit

3\. Now, run the `Get-ChildItem` cmdlet below to verify the copied file exists in your specified location.

```powershell
Get-ChildItem $destPath
```

![Verifying the copied file exists in the specified location](https://adamtheautomator.com/wp-content/uploads/2023/12/image-133.png)

Verifying the copied file exists in the specified location

## Leveraging the `-LiteralPath` Parameter in PowerShell cmdlets

You’ve already harnessed the power of Robocopy to navigate the intricate paths of file management. Yet, a lingering question remains: How can you further enhance your control and precision in handling file operations?

PowerShell offers cmdlets with parameters, like `-LiteralPath`, that let you conquer the complexities of file management.

To perform file operations using the `-LiteralPath` parameter, execute the following:

1\. Open PowerShell as administrator and execute the following commands to declare variables to hold the path for the source file and destination paths.

Ensure you replace `<source\symlink.txt>` with your file’s full path and `<destination>` with your preferred destination path.

```powershell
$srcPath=<source\symlink.txt>
$destPath=<destination>
```

2\. Next, run the [`Copy-Item`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/copy-item) command below to copy the `symlink.txt` file to the specified destination (`$destPath`). The `-LiteralPath` lets you specify the file path in a literal manner without any wildcard character interpretation.

This command, when successful, has no output to the console, but you’ll verify the result in the following step.

```powershell
Copy-Item -LiteralPath $srcPath -Destination $destPath
```

Related:[Copy Files Efficiently with PowerShell Copy-Item: A Comprehensive Guide](https://adamtheautomator.com/copy-item/)

> 💡 _When necessary, the `-LiteralPath` also works with other cmdlets for file operations, such as [`Move-Item`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/move-item), [`Rename-Item`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/rename-item), and [`Remove-Item`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/remove-item)._

3\. Lastly, run the below `Get-ChildItem` command to list files and folders within the destination path (`$destPath`).

```powershell
Get-ChildItem $destPath
```

![Verifying the file has been copied successfully to the destination path ](https://adamtheautomator.com/wp-content/uploads/2023/12/image-136.png)

Verifying the file has been copied successfully to the destination path

> 💡 _While the `-LiteralPath` works as excellently as it does, this parameter is primarily used for specifying the source path or file name. But in scripting scenarios, the `-LiteralPath` ensures your script operates on the exact paths specified, reducing the risk of errors due to unexpected character interpretations._

## Extracting Archive Files via the `Expand-Archive` Command

Suppose you’ve downloaded an archive file (ZIP) with an absurdly long name you wish to extract without changing the name. In such cases, PowerShell’s `Expand-Archive` command can be a practical solution.

The `Expand-Archive` command allows you to unzip or extract files from an archive while providing the flexibility to handle long paths.

To extract archive files leveraging the `Expand-Archive` command, undertake the following:

1\. Execute the following commands in PowerShell (as admin) to declare variables to hold the full path to your archive file and the destination path.

```powershell
$srcPath=<source\file.zip>
$destPath=<destination>
```

2\. With variables declared, run the below [`Expand-Archive`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.archive/expand-archive) command, which provides no output but extracts the archive file to your specified destination.

```powershell
Expand-Archive -Path $srcPath -DestinationPath $destPath
```

Related:[Introducing PowerShell Unzip and Zip Commands on Archives](https://adamtheautomator.com/powershell-unzip/)

3\. Finally, run the `Get-ChildItem` command below to view the list of files and folders within the destination path (`$destPath`).

```powershell
Get-ChildItem $destPath
```

Notice two items in the output: the archive file (text in red) and the extracted folder (highlighted in blue). This output confirms you’ve successfully extracted your archive file without triggering the “Destination Path Too Long” error.

![Verifying the contents of the destination path](https://adamtheautomator.com/wp-content/uploads/2023/12/image-137.png)

Verifying the contents of the destination path

## Conclusion

Throughout this journey, you’ve covered an arsenal of strategies to conquer the notorious “Destination Path Too Long” error on Windows. You’ve explored various techniques, from renaming parent folders to the prowess of 7-zip and enabling Win32 long paths support.

Symbolic links offered a clever workaround, and the mighty Robocopy demonstrated its prowess for efficient file operations. Your dive into PowerShell showcased the utility of the `-LiteralPath` parameter and the `Expand-Archive` command. All these proved invaluable for extracting files without succumbing to path length constraints.

Now, why not consider combining these strategies to create robust solutions tailored to your specific challenges? Experiment with scripting in PowerShell, integrating symbolic links where needed, and fine-tuning your file operations with Robocopy.

Remember, the key lies not just in solving the immediate problem but also in understanding how these methods can work harmoniously to tackle a range of file-related challenges.

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fdestination-path-too-long%2F&text=Addressing%20the%20Windows%20Error%3A%20Destination%20Path%20Too%20Long)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fdestination-path-too-long%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fdestination-path-too-long%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2024/04/idfix.jpg)

### [Solve Azure AD Connect Errors via the Microsoft IdFix Tool](/idfix/)

Fix Azure AD Connect errors fast with the Microsoft IdFix tool—your go-to solution for seamless synchronization and efficient directory management!

![](https://adamtheautomator.com/wp-content/uploads/2024/04/sandboxie.jpg)

### [How to Install Sandboxie on Windows](/sandboxie/)

Secure your Windows system with Sandboxie. Learn how to install this tool hassle-free and safeguard your digital activities!

![](https://adamtheautomator.com/wp-content/uploads/2022/11/How-to-Install-NitroShare-for-Cross-Platform-File-Transfer.jpg)

### [Install NitroShare and Streamline Your File Transfers Today](/nitroshare/)

Simplify cross-platform file transfers with NitroShare. This tutorial guides you through installation and use for fast, effortless file sharing between different operating systems.

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
