Fix Destination Path Too Long Windows OS

 

Getting an error while copying/moving/deleting files or folders  "Destination Path Too Long"



Fix Destination Path Too Long without any third party tool/software










Trust me you don't required any other tool to do so....


 

Here is the solution : Pick your solution from below three cases 👀








Case 1 : Copying Long Path Folder and its sub folders/files 👇




Folder Source Location :  D:\Test folder



Folder Destination Location : G:\New Folder




You can use below 2 cases command from Powershell or CMD with an administrator privilege's



Robocopy /E <source> <destination>  


/E : will copy all empty folders


or 


Robocopy /S <source> <destination>  


/S  : don't copy empty folders


Here is our command as per test case


Robocopy /E "D:\Test folder" "G:\New Folder"


or 


Robocopy /S "D:\Test folder" "G:\New Folder"







Case 2 : Moving Long Path Folder and its sub folders/files 👇




Robocopy "D:\Test folder" "G:\New Folder" *.* /E /MOVE


or 


Robocopy "D:\Test folder" "G:\New Folder" *.* /S /MOVE







Case 3 : Getting an error while deleting the folder  👇



Create an empty folder in any name



Empty Folder Name : E:\test1



Long Path Folder : G:\Sourcecode



Command will be below (change the folder name as per you)



Robocopy.exe "E:\test1" "G:\Sourcecode" /purge



Note : Purge command will be executed in Powershell only






If you enjoyed this article, follow and share it with your friends and colleagues!!!!!!!!!!! 👍


Posted By : Kamlesh Gaur




Comments