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

Martin Brinkmann
Nov 25, 2017
Software
|
12

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.5 based on 3 votes
Software Name
SuperDelete
Operating System
Windows
Software Category
Administration
Landing Page
Advertisement

Tutorials & Tips


Previous Post: «
Next Post: «

Comments

  1. Mark Lee said on March 11, 2023 at 3:39 pm
    Reply

    You should try using the LongPathTool also. It is a very useful tool and easy to use. It worked perfectly for me.

  2. Patrick Wank said on February 26, 2019 at 9:18 pm
    Reply

    i think its also based on bit. 64 or 32 bit you are using>>>

  3. 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.

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

    use robocopy

  5. acme said on November 28, 2017 at 4:32 pm
    Reply

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

    1. Patrick Wank said on February 26, 2019 at 9:19 pm
      Reply

      what dos name??? can you explain???

  6. 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
  7. 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.

  8. 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.

  9. 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

    ?

  10. 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?

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.