Have you ever faced an error from Windows File Explorer saying that the file you are dealing with has a Long Path? That is because Windows only supports paths less than 260 characters in size. You can have files with paths greater than that length, but Windows Explorer would not be able to perform some actions on that file. In most of the cases, the origin of such files is other operating systems and environments where such files are supported and executed. If you are looking to delete any such files from your computer, we have covered a small utility called ‘SuperDelete’ that can help you out.
Source Path Too Long
At such times you can receive a Source Path Too Long error dialog box. Microsoft suggests that you try moving the file to another location. But if that does not help you, using SuperDelete may.
Delete files with Long Path using SuperDelete
SuperDelete is a free command-line utility for Windows that lets you remove files and folders with very long path names. This utility comes very handy when Windows Explorer is not able to delete a few unwanted files that have the path longer than 260 characters.
This tiny tool is super easy to use and configure. All you need to do is download the script and open a CMD window and execute commands to delete the files. SuperDelete supports files having path up to 32767 characters which are way beyond the default 260 character limit. So, the tool should work pretty much fine for normal users.
Also, if you have administrator privileges, you can skip all the ACL checks and directly delete a file or folder. ACL or Access Control List is the list of Access Control Entries that specify the access rights to an object for a trustee.
To get started, head over to the releases section in the GitHub repository and download the latest executable file. Optionally you can download the source code as well if you want to include SuperDelete in your projects or want to compile it yourself. Once you have the executable, open a CMD window in that folder. Now you can execute the following commands to delete a file or folder:
In the above command, the path is the full path to the file or folder you want to delete. Executing this command will throw up a confirmation message. Confirm the prompt, and your file will be deleted from your computer.
superdelete.exe -s path
This command works in a similar way; the only difference is that it would not show any confirmation. It will directly go ahead and delete the file without a prompt.
superdelete.exe --bypassacl path
This command implements the feature that we’ve been talking about in this post. If you have administrator rights on the drive, you can bypass all the ACL checks even if you do not have sufficient rights in ACL to remove that file. This is useful when a drive is moved from another machine or Windows installation.
SuperDelete is an amazing little tool that gets the job done. The tool runs entirely from the command line, and some users might find it difficult to access. But all in all, this tool works when it comes to deleting files with long paths which cannot be accessed by Windows Explorer.
Click here to download SuperDelete.
You might also want to check out Long Path Fixer for Windows 10. This tool will let you fix all the path too long related errors on your Windows machine. The tool also has a GUI that makes it more convenient to move or delete files with long paths. Also, TLPD is a long file path finder to detect files with long paths.