Partition Magic offers an introduction to files with long file names. Based on that, it provides you with 2 methods to delete files with long file names. You can delete a file with long name by using these methods.
MiniTool Partition Wizard is an all-in-one partition manager. It allows you to find what’s taking up your hard drive space and free up space by deleting useless files. As a free file deleter, it enables you to permanently delete files easily.
Besides, MiniTool Partition Wizard can be used as a duplicate file finder, helping you find duplicate files on your computers. After that, it enables you to delete these duplicate files to release disk space. Download and install this software on your computer, and then use it to delete unwanted files or manage your partitions/hard drives.
MiniTool Partition Wizard FreeClick to Download100%Clean & Safe
Files with Long File Names
Long File Name (LFN) is a naming convention used by Windows to specify file and directory names up to 256 characters. If a file has a file name with more than 255 characters, Windows will show a warning and stop you from operating it.
This limitation results from the following factors.
- Compatibility: Long file paths can cause compatibility issues with certain applications or scripts that might not address paths longer than the specified limit.
- Legacy software: Some older software or utilities may not be designed to handle long file paths, resulting in errors or unexpected behavior.
- API limitations: The Windows API has limits on path length. Applications using these APIs may prompt issues with long paths.
- System stability: Extremely long paths can impact system stability and performance, especially when copying, moving, or backing up files.
If your file names are too long, Windows may prompt the following error messages while you delete these files:
- Path too long
- File name too long
- Error cannot delete file: cannot read from source file or disk
- Cannot delete file or folder. The file name you specified is not valid or too long. Specify a different file name.
- Cannot remove folder <folder_name> – the filename or extension is too long
Method 1: Delete Files with Long File Names via DIR Command
According to user reports, DIR command can effectively delete files with long names. You can also have a try!
Step 1: Press the Windows and E keys to open File Explorer.
Step 2: Navigate to the directory where files with long names are located.
Step 3: Press and hold the Shift key. Right-click on the empty area and choose Open PowerShell window here.
Step 4: In the prompted window, type DIR /X and hit the Enter key to execute the command. Then all the files in the directory will be displayed and files with long names will be reduced to “WHYSOL~1.TXT”.
Step 5: Delete files with long file names by running the command: DEL FILENAME.TXT. Alternatively, you can also run this command: del “\\?\c:\<very_long_path_and_file_name.ext>”
Method 2: Delete Files with Long File Names via Third-Party Software
Long Path Eraser is a tool developed by Enter srl that enables you to delete a file with long name successfully. It can automatically delete the folder you choose, including all the files and subfolders within it. If you can’t delete files with long file names by running commands, try using it to complete the task.
With a simple and intuitive interface, it is easy to use. By using this app, you can delete folders with more than 260 characters in their title. Please note that Long Path Eraser will delete files permanently. You should ensure that you don’t need these files with long file names anymore before starting the process.
Download and install Long Path Eraser on your computer. Then run it and follow the on-screen instructions to delete files with long file names on your device.
Conclusion
This post collects 2 methods to delete files with long file names on Windows 11. If you want to delete a file with long name, try these methods now!