“Source Path Too Long”: How to Delete, Rename or Move these files/ folders in Windows
How to fix the error “Source Path Too Long” in Windows ? or How to Delete, Rename or Move files with file name too long? This article will help you solve it.
If your PC has files, folders with “long names” or “many levels of sub-folder” then you cannot Rename, Delete or Move them to other location in Windows Explorer. Your Windows will show the error “Source Path Too Long”:
The source file name(s) are larger than is supported by the file system. Try moving to a location which has a shorter path name, or try renaming to shorter name(s) before attempting this operation.
The error’s name “Source Path Too Long” has already described all about the error, the reason of the error. This because the full path of files or folders are too long, larger than is supported by Windows. Windows limits the full path of files, folders by 255 characters (refer: https://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx?f=255&MSPPError=-2147217396#maxpath).
Many people also guide to fix this error, but it seems to be quite difficult for who are not professional users, for example, we can use third party’s softwares (Long Path Tool, Unlocker, FilExile, Long Path Eraser…) or use Robocopy in Windows Command Line. Actually, no need for such complex! No need other 3rd softwares. Let’s make it simple by following my instructions below.
How to fix error “Source Path Too Long” in Windows
There are 3 methods you can delete files with “Source Path Too Long” in Windows:
– Method 1: Use Winrar or 7Zip
– Method 2: Use Command Line (ROBOCOPY)
– Method 3: Use 3rd softwares (We dont need it and I never use it)
1) Delete, Rename or Move “Source Path Too Long” files/ folders by WINRAR or 7Zip
This is the easiest and simplest way to Delete, Rename or Move files/ folders with “Source Path Too Long” in Windows. With this tips, anyone can do it !
– Just open Winrar or 7Zip (archiver softwares that are almost pre-installed in all computers). I prefer using 7Zip because it is total free.
– In Winrar or 7Zip, browse to files, folders you want to Delete, Rename or Move and do it! Winrar and 7Zip allow you do not limit the full path of files, folders by 255 characters as Windows Explorer does. You can shorten the full path by renaming the files/ folders then come back with Windows Explorer or Delete these files, folders directly in Winrar or 7Zip.
Done! It is so easy, right!
The above tips is enough to fix the error “Source Path Too Long“, but if you still want to discover your Windows computer or you are an expert in working with Windows Command Line then you may want to checkout the command ROBOCOPY below.
2) Delete “Source Path Too Long” files/ folders by Command Line (ROBOCOPY)
ROBOCOPY (Robust File Copy for Windows) is default available command on Windows 7 and higher. Robocopy is a Windows command to copy files from one location to another. The syntax for ROBOCOPY is quite easy:
robocopy
[ [ …]] [ ]
The command ROBOCOPY /MIR will mirror the entire folder and it also allows us secured delete files, folders with too long names (full path too long, actually)
To delete files/ folders with ROBOCOPY command, just type or copy/paste below commands into the Command Prompt window:
> MKDIR TempFolder
> ROBOCOPY TempFolder “FullpathofFoldertoDelete” /MIR
Note:
– FullpathofFoldertoDelete is the full path of the folder you want to delete (or the full path of folder that contains the files you want to delete)
– The second command will mirror the folder TempFolder (an empty folder that is created by the first command) to the destination folder (the folder you want to delete): That means the folder that you want to delete is now empty!
Done.
Bonus: Add RoboDelete function into Windows Context Menu
If you don’t want to type commands each time, you can add this function into Windows Context Menu to delete “Source Path Too Long” files/ folders right on Windows Explorer. With this “RoboDelete” menu, you can delete all files/ folders regardless of whether its name is too long or not.
– Step 1: Use Notepad (or Notepad++) to create a file .REG (for example robodelete.reg) with below content:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTDirectoryshellDelete]
[HKEY_CLASSES_ROOTDirectoryshellDeletecommand]
"Extended"=""
@=""D:robodelete.bat" "%1""
– Step 2: Use Notepad (or Notepad++) to create a file .BAT. Save this file to D:robodelete.bat
(exact with your setting in the file robodelete.reg). Copy then paste below content into your BAT file:
mkdir c:empty
robocopy /MIR c:empty %1
rmdir %1
rmdir c:empty
– Step 3: Run the file robodelete.reg then restart your computer.
Note:
You should check carefully before each time you delete files, folders with this menu (ROBODELETE) because these files/ folders will be deleted permanently (not move to Recycle Bin) and there is no way to undo this action.
You can customize the menu’s name, for example, “robodelete”, “Robo Delete”, “Delete LongFile”…
Tutorial Video: How to Delete, Rename or Move “Source Path Too Long” files/ folders by WINRAR or 7Zip
If you need any further help, feel free to leave a comment.
Cheer!
Source: https://easytipz.com/computer-tips/source-path-too-long-how-to-delete-rename-or-move-these-files-folders-in-windows/
No comments: