How to Delete Files with Too Long File Names on Windows 11

Delete Files with Too Long File Names on Windows

Are you unable to delete a file with too long name? Well, it’s not due to some virus or malware. Certain bugs from the previous version of Windows are persisted in Windows 11. Like, you cannot delete a pdf file that has too long a name, using the context menu. Well, no worries, there are some ways to get rid of files with too long file names.

In older versions of Windows, Windows used to give an error that, “The file name(s) would be too long for the destination folder”. And, you could delete the file only after shortening the file name. But, in the latest Windows 11, you cannot rename certain long-name files. In addition, when you try to delete the file nothing happens. Even, you cannot move such files to a different location. However, here’s how to permanently delete files with too long file names. Also, I will suggest you enable Delete File Confirmation Dialog in Windows 11.

Delete Option not Working on Windows 11
The file does not get deleted using the Delete Option.

Use Windows Terminal to Delete files with too long names.

Since you’re unable to delete the file using the context menu. Then, the best option you have is to use a command. You can use the command prompt, Windows PowerShell, or Terminal to delete the file.

  1. Do right-click on the too-long file name and then click on the “Copy as path” option. Also, make sure the file is not opened in the background.
Copy path of too long file name
  1. Once, the path gets copied. Right-click on the Windows icon and then click on Terminal(Admin).
Open Windows Terminal on Windows 11
  1. A UAC window will appear, click on Yes.
  1. Once Windows PowerShell is open. Type del, after that the path that you copied.
del <path>
Delete Files with Too Long Name using Terminal
  1. Press the enter key.

The file will now permanently be deleted. So, if the file is important then don’t use the above-mentioned command. Because too long filenames can be a part of Windows System Files. Or, it can be cache files of a system or third-party Windows Software. Which will get deleted after you uninstall that software.

Rename the PDF File with the Too Long File Name.

Usually, this issue occurs when we download and save a pdf file, with a too-long file name on our Computer. Then, Windows restricts to deletion or renaming of the file. But, no worries, here’s a fix for it.

  1. Right-click on the downloaded file, and click on open with > Google Chrome. Yes, you can use the Edge web browser.
Open PDF File in Google Chrome
  1. The File will now get opened in Chrome Web Browser.
  1. Now, click on the Print Icon or Press the Ctrl + P keyboard shortcut.
  1. Print Window will appear. Now, in the destination, select the “Save as PDF” option.
  1. Click on Save.
Save as PDF to Rename File
  1. Save as Screen will appear. Select your desired location, enter the correct file name, and click on Save.
Enter new file Name

A new PDF file will be created with the name you entered. You can delete the older file using the above-mentioned method.