How to delete folders and files with too long source paths – Windows Guide

Thanks to a simple command line tool you will be able to delete files and folders with paths longer than 260 characters.

Until now, the management of files and folders of Windows only supported a maximum length of 260 characters for the paths, limit recently exceeded with the latest versions of Windows 10 thanks to the new “WinApi Unicode” that brought the maximum length to 32,767 characters.

However, this new functionality is only accessible to all those applications able to manage long routes through a specific configuration within their “Manifest”. For this reason, apps like File Explorer may not be able to delete or change a path generated by another application.

To solve the problem you can rely on SuperDelete, a command line tool that can eliminate all those files and folders that file managers can not handle, such as those with too long paths.

SuperDelete is a free program available at https://github.com/marceln/SuperDelete/releases.

To work it requires the .NET 4.0 framework (or higher), which will be installed on the first run if it is not present in the system.

How to use SuperDelete 

Download the program and extract the executable file that is inside it in a system folder, such as C:\Windows\System32. This way you will add the command to the default Windows set.

Then open the Command Prompt to type the command:

superdelete C:\PathCompletoAlFileOCartella

Confirm the deletion of the file by typing Y (Yes) and you’re done!

But the functions of SuperDelete do not end here, in fact you can also use the following commands:

  • SuperDelete.exe –silent PathFollowAlFileOCartella
    Delete the confirmation request before deletion.
  • SuperDelete.exe –bypassAcl PathCompletoAlFileOCartella
    Ignores ACL file checks even if the user does not have the rights.
  • SuperDelete.exe –printStackTrace PathCompletoAlFileOCartella
    Print stack trace, especially useful for debugging.

Leave a Comment