SuperDelete: remove files with paths that are too long on Windows

0
238

Microsoft’s Windows operating system has had a 260 character limit for paths for a long time. While most users may not run into issues with folder names and file names that exceed the limit, some may. If a path is too long, for instance when a USB Flash Drive is connected to the system that was used on a Linux distribution before, Windows won’t run operations such as remove or edit on files if the path is exceeded.

Microsoft did add a new option to Windows 10 and Windows Server 2016 to enable NTFS Long Path in the Group Policy, it only works for “manifested” programs.

Third-party developers created programs to address the issue. There is Too Long Paths Detector which highlights paths that are too long on a Windows machine, or Long Path Fixer to run move, copy or delete operations on files or folders that exceed the path limit. There is also a manual option, as you may reduce the path by changing file and folder names to drop below the 260 character limit.

SuperDelete

superdelete long path

SuperDelete is a command line tool that has been designed specifically to delete files and folders that cannot be deleted in Explorer because the path exceeds the character limit.

A Windows command-line tool that can be used to delete files and folders with very long paths (longer than MAX_PATH 260 characters). It supports paths as long as 32767 characters. It works by using extended-length paths and the Unicode versions of the WinApi functions for enumerating and deleting files. In addition, it supports bypassing ACL checks for deleting folders if the user has administrative rights on the drive.

Usage is pretty simple: download and extract the program to the local Windows machine, or put it on a USB Flash Drive or tools collection disc. Run superdelete.exe fileOrFolderPath to run the delete operation with confirmation.

Read also:  RegistryChangesView: monitor Windows Registry modifications

The program lists the path and file name, and prompts you to accept (y) or decline (n) the request.

The application supports three parameters that you may add to the command:

  • –silent runs the command without confirmation.
  • –bypassAcl bypasses the ACL check if you have elevated rights on the drive.
  • –printStackTrace helps with debugging. It prints the callstack where an exception occurs.