您是否曾经遇到过来自Windows 文件资源管理器(Windows File Explorer)的错误,提示您正在处理的文件具有长路径(Long Path)?这是因为Windows仅支持小于260 个字符(260 characters)的路径。您可以拥有路径大于该长度的文件,但Windows 资源管理器(Windows Explorer)将无法对该文件执行某些操作。在大多数情况下,此类文件的来源是支持和执行此类文件的其他操作系统和环境。如果您想从您的计算机中删除任何此类文件,我们提供了一个名为“ SuperDelete ”的小实用程序,它可以帮助您。
源路径太长
在这种情况下,您可能会收到Source Path Too Long错误对话框。Microsoft建议您尝试将文件移动到其他位置。但是,如果这对您没有帮助,则可以使用SuperDelete。
(Delete)使用SuperDelete删除具有长路径的文件(Long Path)
SuperDelete是适用于(SuperDelete)Windows的免费命令行实用程序,可让您删除路径名很长的文件和文件夹。当Windows 资源管理器(Windows Explorer)无法删除一些路径超过 260 个字符的不需要的文件时,此实用程序非常方便。
这个小工具非常易于使用和配置。您需要做的就是下载脚本并打开CMD窗口并执行命令以删除文件。SuperDelete支持路径最多为 32767 个字符的文件,这远远超出了默认的 260 个字符限制。因此,该工具对于普通用户来说应该可以正常工作。
此外,如果您具有管理员权限,则可以跳过所有ACL检查并直接删除文件或文件夹。ACL或访问控制列表(Access Control List)是访问控制条目(Access Control Entries)的列表,用于指定受托者对对象的访问权限。
要开始使用,请前往GitHub存储库中的发布部分并下载最新的可执行文件。如果您想在项目中包含SuperDelete或想自己编译,您也可以选择下载源代码。获得可执行文件后,在该文件夹中打开一个CMD窗口。现在您可以执行以下命令来删除文件或文件夹:
superdelete.exe path
在上述命令中,路径是要删除的文件或文件夹的完整路径。执行此命令将抛出一条确认消息。确认提示,您的文件将从您的计算机中删除。
superdelete.exe -s path
该命令以类似的方式工作;唯一的区别是它不会显示任何确认。它将直接继续并删除文件而不提示。
superdelete.exe --bypassacl path
这个命令实现了我们在这篇文章中讨论的特性。如果您对驱动器具有管理员权限,即使您在ACL中没有足够的权限来删除该文件,也可以绕过所有ACL检查。(ACL)当驱动器从另一台机器或Windows安装移动时,这很有用。
SuperDelete是一个很棒的小工具,可以完成工作。该工具完全从命令行运行,一些用户可能会发现它难以访问。但总而言之,这个工具适用于删除Windows Explorer(Windows Explorer)无法访问的长路径文件。
单击此处(here)(here)下载 SuperDelete。
您可能还想查看适用于Windows 10的(Windows 10)Long Path Fixer。此工具可让您修复Windows机器上所有与路径过长(path too long)相关的错误。该工具还有一个GUI,可以更方便地移动或删除具有长路径的文件。此外,TLPD是一个长文件路径查找器(long file path finder),用于检测具有长路径的文件。
Source Path Too Long? Use SuperDelete to delete files with such errors
Have you ever faced an error from Windows File Explorer saying that the file yoυ 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:
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 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.