SuperDelete: remove files with paths that are too long on Windows - gHacks Tech News

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

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.

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.
Summary
software image
Author Rating
1star1star1star1stargray
4 based on 1 votes
Software Name
SuperDelete
Operating System
Windows
Software Category
Administration
Landing Page




  • We need your help

    Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

    We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats (video ads) or subscription fees.

    If you like our content, and would like to help, please consider making a contribution:

    Comments

    1. Chris said on November 25, 2017 at 8:22 am
      Reply

      Is it the 8.3 filepath that cannot be more than 260 chars or the long filepath?

    2. Andrew said on November 26, 2017 at 7:46 am
      Reply

      “It supports paths as long as 32767 characters.”

      .. I don’t know

      ….
      …..
      ……
      ……. doesn’t seem quite long enough

      ?

    3. A different Martin said on November 26, 2017 at 5:10 pm
      Reply

      Automatically generated backups from my syncing routines occasionally surpass Windows’ filepath limit, which is a hassle when I’m cleaning out my backups folder. This utility looks to be a lot easier than the clumsy workarounds I previously used, so thanks for pointing it out, Martin.

    4. X said on November 26, 2017 at 7:44 pm
      Reply

      It would be nice to have a program that could:
      1- Scan a disk or a folder (recursively, of course) and output a .txt list of too long paths detected. (Yes, I know Too Long Paths Detector does that, sort of); but mostly
      2- Use such a list as input (instead of having to issue a command for each item in the list).
      Thank you.

    5. Stefan said on November 28, 2017 at 2:11 am
      Reply

      I think You can, at least in Windows 10 (maybe 7 and 8.1 to), bypass the limit by some reghacks. I think i have a regfile or a commandline (bat) somewhere that fixes that. But still, there will be a limit.

      Martin, do You know about that ?

      1. Martin Brinkmann said on November 28, 2017 at 5:58 am
        Reply
    6. acme said on November 28, 2017 at 4:32 pm
      Reply

      I just use the dos name in those instances, no special tool required

    7. JACK REACHER said on December 15, 2017 at 9:47 pm
      Reply

      use robocopy

    8. Danny said on February 7, 2018 at 2:27 pm
      Reply

      Use GS RichCopy 360 and change the directory location with smaller directory names – that way you’ll be able to fix this problem. Most other tools that you work with cannot copy files with long path names.

    Leave a Reply