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 cannot perform some actions on that file. In most cases, the origin of such files is other operating systems and environments where such files are supported and executed. If you want to delete any such files from your computer, we have covered a small utility called ‘SuperDelete’ that can help you.
Fix Source Path Too Long error in Windows 11/10
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 in handy when Windows Explorer is unable to delete a few unwanted files with paths longer than 260 characters.
This tiny tool is super easy to use and configure. All you need to do is download the script, open a CMD window, and execute commands to delete the files. SuperDelete supports files with paths up to 32767 characters, which is way beyond the default 260-character limit. So, the tool should work pretty well 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 also download the source code 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:
superdelete.exe path
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 similarly; the only difference is that it does not show any confirmation. It will directly delete the file without a prompt.
superdelete.exe --bypassacl path
This command implements the feature we’ve been discussing 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. It runs entirely from the command line, and some users might find it difficult to access. But overall, this tool works when it comes to deleting files with long paths that cannot be accessed by Windows Explorer.
Click here to download SuperDelete.
You might also want to check out Long Path Fixer for Windows 11/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.
Related post: The source file name(s) are larger than is supported by the file system
How do I turn off the Path limit?
If you want to make Windows accept File Paths over 260 characters for win32 applications and store applications, then you can do this using the Registry Editor. First, access the FileSystem Registry key. The path is:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
On the right section, double-click on LongPathsEnabled DWORD (32-bit) Value, and add 1 in the Value data field. Press the OK button. You can also use Group Policy Editor and set the Enabled option for Enable Win32 long paths setting to use long paths.
TIP: TLPD is a long file path finder to detect files with long paths.
Should I disable the Path limit?
It is recommended to disable the path length limit after you have installed Python or some other application that requires large file paths or name support. If you won’t do so, it may create trouble in your project or work and you may end up with an error saying The file name(s) would be too long for the destination folder or a similar error while creating or deleting a file.