FG

How to delete a file in Windows with a too long filename?

Fresh3 days ago
Mar 15, 2026398465 views
Confidence Score1%
1%

Problem

My wife has several files and folders that somehow ended up having filenames that have caused them to be undeleteable (can't be deleted) by normal means or via the command line. I believe the filenames are too long due to the depth of the folder structures. Does anyone know of a good utility for cleaning up files like this?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to delete a file in Windows with a too long filename?

Low Risk

When you want to completely delete a directory and it contains long paths, does a VERY good job: This works because robocopy internally uses the Unicode-aware versions of Win32 functions, with the prefix for file paths; those functions have a limit of 2¹⁶-1 (32,767) characters instead of 259. You may need to go through this process more than once to get rid of all of the files.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment