Get IT Solutions

How to do IT
Menu
  • Home
  • SCCM 2012
    • Deploy Packages
    • Troubleshooting errors SCCM 2012
  • Windows
    • Applications Silent Install
    • Windows Tools
    • Windows Error
    • Script
    • Exchange Server
    • Troubleshooting Office
    • Applications Errors
  • Database
    • SQL Server
    • MySQL
    • Oracle
  • Cybersecurity
  • Other
  • Reviews

Best Solutions for Destination Path too Long on Windows

Every windows user has encountered at least once the destination path too long message. This appears mainly when you try to copy or move a file to a folder. Any path-name longer than 256 characters will cause failure of operations like copy/delete/rename.

Full Error: “The file name(s) would be too long for the destination folder. You can shorten the file name and try again, or try a location that has a shorter path.”

Destination Path too Long

Destination Path too Long

Windows has two path length limits. Unicode NTFS has a path length limit of over 32,000 characters for many operations. NTFS volume Windows is able to use that limit when doing a copy, move, or rename within it. But Windows and especially the Win32 API library has a 256/260 folder and name restriction. Some network file systems will also recognize the lower limit. It is possible to use a path of up to 32767 characters when using Unicode API functions.

The name means the entire path of the file/folder starting from the root of the drive, ending with the last subfolder including the file name itself. The system variable MAX_PATH is the one that restricts filenames and file paths to under 260 characters. The error is still encountered on all the recent Windows versions including windows 10 even if the issue is over 20 years old.

Table of Contents

  • How to Fix Destination Path too Long
    • Temporary Solution:
    • Permanent Solution:
    • Conclusion:

How to Fix Destination Path too Long

  1. Shorten the name of the parent folder
  2. Temporarily rename the file extension to text
  3. Using the xcopy command
  4. Using Robocopy Utility
  5. Move, Delete, Or Copy Files Or Directories Using PowerShell
  6. Create a symbolic link
  7. Hidden share path
  8. Enable Long Path Support (Windows 10 built 1607 or higher)
  9. Make Windows 10 Pro Or Enterprise Accept Long File Path

Note!!! Check the article below for the full explanation of every solution above.

The situation when the windows path too long message appears:

Destination path too long – when you try to copy or move files to this destination

File name too long to copy – when you try to edit/rename the file name

Source path too long – when you try to copy or move from this source

Filename too long to delete – when you try to delete the file

source path too long

Source path too long

The following article will try to fix this issue using the best methods. First to try to fix temporary for certain files/folders. After that to try to fix for permanent.

READ ALSO -   Best Methods To Fix Connection Failed With Error 651

Temporary Solution:

Shorten the name of the parent folder

This is a simple way and we will start from this. Rename the parent folder to decrease the full path length. Execute your operation to see whether the issue goes away and if not continue with the next steps.

This is not always applicable and especially if you have a lot of files that are exceeding the length limit. This method is applicable when you have a few files/folders to move/delete/copy.

Temporarily rename the file extension to text

According to Microsoft, .txt files have a higher limit while transferring. If for example you have a zip file just rename .zip to .txt and copy/delete/move to the new destination. Please keep in mind that the file will not work if you don revert back to .zip. Check step by step below:

  1. To rename the file right-click and click to “rename”. Modify only the extension to “.txt”
  2. You are free to move the file to the new destination.
  3. Right-click again to rename and revert back the change to “.zip”
Shorten the name of the parent folder

Shorten the name of the parent folder

Hint! When you try to rename you don’t see the extension, most probability you don’t have it enabled. To enable it go to file explorer and access the view tab. Check the box associated with File name extensions.

  1. View >> Options >> Change folder and search options >> View tab
  2. Uncheck the box corresponding to Hide extensions for known file types

Using the xcopy command

Some users over the internet are reporting that using xcopy command in an elevated command prompt can solve the issue of windows destination path too long. The solution can solve also “Windows file name too long to copy” or “Source path too long”. Check the steps below:

  1. Open CMD by clicking start and search for cmd. Right-click and Run as administrator
  2. Execute the following command by copy and paste to command Prompt:
xcopy *path to source files* *path to destination* /O /X /E /H /K

Note! Edit xcopy *path to source files* the *path to destination* to your real file path.

After click Enter, the file will be transferred. Check the destination if it was successful.

Using the xcopy command

Using the xcopy command

Using Robocopy Utility

Something like xcopy is also robocopy. You can use this windows utility to copy or move data. For example, we will fix below the error when you try to delete long file names. Use CMD again to execute the commands.

First, you will need to move the files with long file name from the directory:

ROBOCOPY c:\testetst1\testetst2\testetst3\longpath\testets.zip c:\tmp\ /MOVE /E

After that to delete the files from the source directory:

Delete c:\testetst1\testetst2\testetst3\longpath\testets.zip /q /f

Read also other Windows Solutions for:

  1. How to Find Large Files on Windows
  2. Enable Bitlocker on Windows
  3. Windows Logon Type
  4. How to delete hiberfil.sys

Move, Delete, Or Copy Files Or Directories Using PowerShell

PowerShell is known as a powerful tool used by power-users to automate and solve many windows problems. Below we will solve the Destination Path too Long error when copy, move, or delete using the PowerShell tool. First, open the PowerShell tool by search it on the windows menu.

Copy Directory Using Copy-Item

So in the first example, we will try to copy the “TestSource” directory to “TestDestination”. The cmdlet item for this operation is Copy-Item following by parameters “-Destination” and “-Recurse”. You need to be inside the path where the “TestSource” directory is located.

Copy-Item TestSource -Destination TestDestination –Recurse

-Destination – Where we want the copy to be

-Recurse – Copy all the items inside to the destination

Note! The copy command will not remove the files inside the source the folder.

Move Directory Using Move-Item

Instead of Copy-Item, you can use the Move-Item cmdlet in order to move permanently the files from the source to the destination.

Move-Item -Path TestSource -Destination TestDestination

-Path – Defines the item we want to move

-Destination – Where we want the copy to be

Delete Directory Using Remove-Item

In order to delete the directory and all the files inside it we will need to use the Remove-Item cmdlet.

Remove-Item TestSource -Recurse -Force

-Recurse – Delete everything inside

-Force – Make it do that without asking us if we’re sure for every item inside.

Create a symbolic link

Creating a symbolic link to a part of the path can short the total path length of the file/directory. The below command executed on CMD can finish the work:

mklink /D "C:\Link To Folder" "C:\Users\Name\Original Folder"

In order for this trick to work you will need to use “C:\Link To Folder” to perform file operations.

Create a symbolic link

Create a symbolic link

Hidden share path

This solution works especially on file share paths when you need to move a lot of directories from a place to another. What you need to do is to map the path in order to short it.

  1. Navigate to the full path and copy it
  2. Go to My Computer and click to “Map Network Drive”
  3. Select your preferred drive later
  4. Past the long directory path in the “Folder” box

You can copy files and directories from this path and into it without receiving the “Destination path too long” error.

Hidden share path

Hidden share path

Permanent Solution:

Enable Long Path Support (Windows 10 built 1607 or higher)

Windows 10 on the new anniversary update 1607 has provided the possibility to disable the path restriction on the system level. So the MAX_PATH limit now can be changed on Registry Editor. Below the steps:

  1. First, you will need to update your windows 10 with 1607 or higher
  2. Open the Registry editor by typing (Win+R) and after that type Regedit. After pressing Enter will open Registry Editor
  3. Go to the following path on Registry Editor: Computer >> HKEY_LOCAL_MACHINE >> SYSTEM >> CurrentControlSet >> Control >> FileSystem
  4. On the right window pane double-click on the “LongPathsEnabled”.
  5. Edit the value data to “1” and click ok in order that the changes be saved.
  6. Close the Registry Editor and try to move/copy/delete the long-named files or folders.
Enable Long Path Support (Windows 10 built 1607 or higher)

Enable Long Path Support (Windows 10 built 1607 or higher)

Make Windows 10 Pro Or Enterprise Accept Long File Path

Windows 10 Pro Or Enterprise comes with a feature to enable long file path from Group Policy Editor. To make this function you will need

  1. Open the Group Policy Editor by going to the Start menu and typing in gpedit
  2. navigate to Computer Configuration > Administrative Templates > System > Filesystem
  3. Double-click on Enable Win32 long paths and change it from Disabled to Enabled
  4. Click ok in order to be effective
  5. Try to force the group policy to update
  6. Check if you can copy, move, or delete a long file path or directory.

Conclusion:

We are at the end of our article/guide to resolve the error for Destination Path too Long on windows 10 but not only. The article tries to include every possible solution. Let’s hope that you have found the solution to your situation. Inform us below if you have any other solution working.

Share
Tweet
Google+
Pinterest
Linkedin
Stumble
Email
Prev Article
Next Article

Related Articles

Fix Windows Media Player Server Execution Failed Error
Sometimes when you close Windows Media Player and then launch …

How To Fix Windows Media Player “Server Execution Failed” Error

DPC Watchdog Violation Windows 10 Error
DPC Watchdog Violation Windows 10 error can be caused by …

How to fix DPC Watchdog Violation Windows 10 Error

Best Computers & Laptops

Best Computer for Cyber Security – Laptop and Desktop
Best Computer for Cyber Security
Hey, are you seeking the best computer for cyber security? Well, we must say you have come to the right place to find your answer and guidance. There are a plethora of products out there for you to pick from ...
Read More
Best Computer for Microsoft Office & Excel – Laptop and Desktop
Best Computer for Microsoft Office & Excel
Are you finding the Best Computer for Microsoft Office and Excel? In modern days, the best laptop or desktop set is the one which is both portable, has good looks and offers the smoothest performance. Microsoft Office is a package ...
Read More
Best Computer for Hacking – Laptop and Desktop Selection
Best computer for Hacking
When it comes to hacking, either laptop or desktop, choosing the best computer for hacking would be an exhilarating job. There are many specifications to be considered for hacking ...
Read More

SQL Server Tips

FIX sqlstate 42000 – mysql error 1064 – you have an error in your sql syntax
Sqlstate 42000 Is a general code that come together with other number. Most often comes with the code 1064 and ...
Read More
The execute permission was denied on the object – SQL Server Error
The execute permission was denied on the object
The following article will handle “the execute permission was denied on the object” error appears on SQL Server. This error ...
Read More
How to Read Data from LDF file in SQL Server – A Complete Guide
Read LDF File
Hello Everyone, Today we are going to address the most popular query of SQL users, how to read data from ...
Read More

Search

We are on:

Get FREE SPACE for your PC

3 Method to Delete Temp Files in Windows 7/10 including vbs script

In this post we will explain how to delete temp files windows 7 using three different methods including vbs script ...
Read More

Fastest way to delete hiberfil sys from windows 10/8/7 and XP – CMD

In this article we will explain how to remove or delete hiberfil sys from Windows 10/8/7 and XP . If you does ...
Read More

Learn How to Silent Install Applications

Silent Install Adobe Flash Player
In this tutorial will explain how to silent install adobe flash player 25, Msi and Exe version. How to disable auto update and uninstall older ...
Read More
Java Silent Install and Uninstall Older Version – Deploy Package MSI
This tutorial will explain how to silent install Java MSI/EXE version and disable auto-update. The command line will also uninstall the ...
Read More
Silent Install Adobe Shockwave Player 12 and disable update
In this tutorial will explain how to silent install Adobe Shockwave Player 12 msi and disable auto update. The command will uninstall older ...
Read More
Silent Install Google Chrome MSI, Silent Uninstall and Disable Auto Update
This tutorial will explain how to silent install Google Chrome MSI and disable auto update. The command will uninstall older version of ...
Read More
Silent Install Adobe Reader 11 and DC – msi and exe – disable update
In this tutorial will explain how to silent install Adobe Reader version 11 and DC. We will user both version "msi" ...
Read More
Silent Install Mozilla Firefox msi and exe file – Including Silent Uninstallation
This tutorial will explain how to silent install Mozilla Firefox. We will use MSI and EXE files to perform a silent ...
Read More
Skype Silent Install Msi and disable updates
In this tutorial will explain how to silent install skype  and disable auto update. The command will uninstall older version of Skype and ...
Read More
Filezilla Silent Install msi and exe version
Filezilla silent install tutorial will explain how to perform a silent installation of application. We will explain methods, silent install ...
Read More
Silent install VLC Media Player
In this tutorial will explain how to silent install VLC Media Player. We will explain both methods for exe and ...
Read More
Notepad++ silent install exe and msi version – Command Line
Notepad++ silent install is the new article from a series of silent installations. Notepad++ as free software has two main ...
Read More

Batch File Solutions

How to list files in cmd – Command Prompt – Windows 10
Whenever you want to search and make a list of all files on a specific folder, you used the windows ...
Read More
Batch rename multiple files in folder – CMD script – Bulk Method – Win 10
The following article will teach how to rename multiple files in a folder with the bulk method using Command Line ...
Read More
Batch script rename file using Command Line (CMD) & PowerShell – Windows 10
The following article will use the “rename” or “ren” command to rename the file using a command prompt. Also, we ...
Read More
Change extension of multiple files at once – CMD batch file
The following article will teach the methods to change the extension of multiple files at once using command prompt and ...
Read More
How to delete registry key with command line | PowerShell | Batch
The following article is the third of series about registry and working on it through command line (CMD) and PowerShell ...
Read More
How to add registry key & values with CMD | PowerShell | Batch
The registry is the place where most of the applications store the settings but not only. Used also from the ...
Read More
Unmap Network Drive CMD – (Batch file) – net use delete command
After we posted the methods to map network drive using cmd commands we come this time with the method to ...
Read More
Map Network Drive cmd (batch file) – net use user password
This article will focus on another way to map a network drive on your computer instead of from the explorer ...
Read More
How to Find Large Files on Windows 7 & 10 – CMD Forfiles Command
If the capacity of your hard drive is running low, it is time to clean off some files and to ...
Read More
CMD Script to check disk space on windows and multiple remote servers
The following article will provide you script to check disk space. The Script monitor space on windows and multiple remote ...
Read More

Get IT Solutions

How to do IT

About Us

Get IT Solutions is a personal blog, which is managed to guide people for various topic.

Second Menu

  • Donate
  • About Us
  • Contact Us
  • Privacy Policy

What Will You Find

Automation is our area of writing where are included scripts, batch and various tips to automate your daily job.
Copyright © 2025 Get IT Solutions