How to Fix ‘The Filename or Extension is too Long’?

The ‘The Filename or Extension is too Long’ error occurs when performing various operations on folders and files on internal/external storage in Windows 10 and Windows 11. There are also variations of the error message saying that the file has the wrong name or that the target path is too long.

In today’s article, we will tell you what causes the error in question and how to get rid of it as soon as possible.

Contents

What causes the ‘The Filename or Extension is too Long’ error?

The Filename or Extension is too Long

Microsoft has put limits on the maximum length of paths and file names in Windows 10 and Windows 11. The user needs to adjust to the following limits:

  • max path length (+ name and extension) — 260 characters;
  • max file/folder name length — 255 characters.

Here is an example of the location of the executable file of the Elden Ring game with a target path of 54 characters:

D:\Steam\steamapps\common\ELDEN RING\Game\eldenring.exe

The ‘The Filename or Extension is too Long’ error (and its other variations) occurs to the user when he tries to perform actions with files/folders that have either too long names or too long target paths for their location.

The problem is uncommon, as 260/255 characters is the number of characters that is sufficient for most users. Nevertheless, there are cases when the available characters are not enough. For instance, this problem is relevant to those users who use the disk as a file storage.

Fix for the ‘The Filename or Extension is too Long’ error

Perhaps the most obvious solution in this situation is to shorten the path/folder/file name. Once this is done, the OS will stop naggin’ and let you finish what you want without delay. If shortening is not possible, you can activate support for long paths in the OS settings. This is done in different ways – it all depends on the edition of your Windows.

Windows 10/11 Home

  • Press WIN+R to open the “Run” dialog box;
  • type Regedit.exe in the blank line and press ENTER;
  • at the address bar of the window navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem;
  • find the LongPathsEnabled parameter in the list on the right and double-click on it;
  • set it to 1 (one) and save your changes by rebooting your PC.

Windows 10/11 Professional/Enterprise

  • Press WIN+R to open a “Run” dialog box;
  • type Gpedit.msc in the empty line and press ENTER;
  • in the panel on the left go to “Computer Configuration”→”Administrative Templates”→”System”→”File System”;
  • double-click the “Enable long Win32 paths” option;
  • activate the parameter by setting its value to “Enabled”;
  • save changes you made and restart your PC.

What to do if the error occurs even with long paths enabled

Unfortunately you are guaranteed to get the error ‘The Filename or Extension is too Long’, even if you enable long path support. The thing is that this support does not apply to individual applications, such as Word, Photoshop, Premiere, and even the system Explorer.

To fully work with long paths and names that go beyond the limitations, you need to install third-party file managers. But which ones to look at? We recommend taking a look at the following programs:

  • 7-ZIP
  • Far Manager
  • Directory Opus
  • Explorer++
  • One Commander
  • Total Commander
  • WinRAR

Technically, some of them are not “purebred” file managers, but even with them you can perform, for example, deleting or moving files/folders that show ‘The Filename or Extension is too Long’ error. Not all of them are free – keep that in mind.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments