How to Delete Files With Long Names [Easy Steps & Tips]

Third-party file manager may help you delete the long file names

Reading time icon 5 min. read

Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

Key notes

  • If you have a lot of files with long file names, it can be helpful to either shorten them or create new ones to make them more manageable.
  • However, you may have issues deleting long file names at times because your OS fails to process them.
  • In such a case, a third-party file manager that is capable of deleting the long file names comes in handy.

Have you ever run into a file name that was too long to delete or a file extension that was superfluous? This can happen when you’re removing an old file or editing a new file with a long title. Some files in Windows are strange. You may find that the file name is too long to delete or rename.

If this sounds familiar, we’re here to lift that burden. You don’t have to be stuck with a file you want to get rid of. In this article, we shed more light on how to delete files with long names.

What are long file names?

Long file names are file names that exceed the maximum length of 255 characters. You can use long file names as long as you want, but you must be careful to avoid problems when naming your files.

If you try to save a file with a long filename, Windows will automatically truncate the name to 255 characters or less and then save it to disk. A long filename that is too big for Windows to store on disk will result in an error when the user tries to use that file.

Long file names can be used for several reasons:

  • The file is large and needs to be saved in a different directory from the one it was created in.
  • To allow multiple versions of a document or project to co-exist.
  • The file has special characters or symbols that need to be written out in full, such as copyright information.
  • To provide additional information about the file, such as its size and modification time.
  • The file has long comments or data blocks that need to be displayed using special characters.
  • To indicate that a file is compressed or encrypted.

Why can’t I delete files with long names?

There are many reasons that can prevent you from deleting files with long names. These include:

  • The file is open in another app – If the file is open in any program or application, the file will not be deleted immediately. 
  • Not enough permission – Some files require an administrator account to be deleted. If you’re using a standard account, you may need to switch to one with administrator privileges.
  • You’re deleting a copy – If you try to delete a file that’s been renamed and its original name still exists in your current directory, then Windows will not be able to delete the new name until the original name is deleted first. 
  • OS can’t process it – The operating system has a limit for the length of the name and if the file has a name that exceeds that limit, it will not be able to delete it.

How do I delete files that are too long?

Before you proceed with any of these steps, we recommend you check the following:

1. Use a third-party file manager

Deleting long file names is a tedious task. It can be done using an automated tool or manually, but the latter is more time-consuming and cumbersome.

A third-party file manager is a great way to delete long file names from your computer. It will allow you to search for and select the files you want to keep, as well as delete them all at once.

Aomei Partition Assistant Professional is a third-party file manager that can be used to manage files and folders in your system. It is also one of the best partitioning software available on the market, so you can easily see what you are doing.

AOMEI Partition Assisstant Professional

Powerful file manager that lets you easily manage your partitions, delete unnecessary partitions, and move and resize partitions.
Free trial Visit website

2. Rename the file

  1. Navigate to the folder with the long file name.
  2. Right-click on the file and click on the Rename icon.
  3. Choose a shorter name for the file and press Enter.

While this method works most of the time, some file names are stubborn and won’t delete. For instance, when you try to delete a PDF with a long file name, you may be unsuccessful since most PDFs don’t allow any edits.

You can choose to install PDF editor software to help you edit the file but most of them are paid for. The free ones may be able to help but a majority of them come with basic features. If this works, you should be able to delete the file but if it doesn’t, proceed to the next step.

3. Delete via Command Prompt

  1. Locate the folder location where the long file name is stored, right-click on an empty space and select Open in Terminal.
  2. Type and Enter the following command: DIR /X
  3. Next, type and Enter the following command replacing FILENAME.TXT with the name of the file you wish to delete: DEL FILENAME.TXT
  4. Run the DIR /X command again and check if the deletion was successful. If not, proceed to type in the next command: del "\\?\c:\<very_long_path_and_file_name.ext>

Hopefully, one of these methods has been able to help you get rid of the long file name that wouldn’t delete. Aside from file names, you may also have trouble deleting a folder. If you encounter such an issue, don’t hesitate to check out our expert article on the same.

For any additional thoughts, leave us a comment down below.

More about the topics: File Explorer