The Filename or Extension is too Long? Here's a Fix

Creating a network drive should fix this issue for good

Reading time icon 10 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 are getting the filename or extension is too long error, it might be because of some issues with the directory.
  • A quick and effective solution to this problem is to create a network drive and access the file from there.
  • Another effective solution is to rename the file using Command Prompt as administrator.
the filename or extension is too long

System errors can occur sooner or later, and many users reported having an ERROR_FILENAME_EXCED_RANGE error. This error is often followed by The filename or extension is too long error message.

Thankfully, it is not the most difficult issue to fix, so today, we’ll show you how to get rid of it on Windows 10.

What to do if the filename or extension is too long?

1. Change the directory name

The filename or extension is too long error message usually appears when trying to access or modify a specific file. Usually, the file isn’t the problem. It’s the file’s location.

Windows has a certain limitation regarding file path length; if the file path is too long, you’ll encounter this error. Users reported that they could not move or access the problematic files due to this error.

You need to rename the problematic file or change its path to fix the problem. In most cases, you cannot rename the file, but you can fix the problem by renaming one of the directories that hold this file.

To do that, rename one or more folders that lead to this file, and the problem should be resolved. By renaming the folders, you’ll go below the character limit and be able to access your files again.

2. Create a Network Drive

  1. Locate the folder that contains the problematic file and right-click it. Choose Share with > Specific people from the menu.
  2. Select the user or a group that you want to share your file with and click on the Share button. For security reasons, it’s probably best to select your user name.

You can also temporarily fix this problem by creating a network drive. Before you can use this solution, you need to share your folder. This is relatively simple, and you can do it by following the above.

Once the folder is shared, you need to create a network drive. This is relatively simple, and you can do it by following these steps:

  1. Open This PC. Click the Computer tab and choose the Map network drive option.
  2. Select the desired drive letter and folder path. Be sure to uncheck Reconnect at sign-in option and click the Finish button.
  3. Once you’re done, you’ll see a new drive available and can use it to access the problematic files.

This is a relatively simple workaround, but if you’re unfamiliar with network folders and sharing, you might have problems performing this solution. After creating a network drive, you can easily move the problematic files to a different folder to fix this issue.

3. Use Teracopy

If you’re frequently getting The filename or extension is too long error message, you might be able to fix it by using Teracopy. If you can’t delete the files that are giving you this error, be sure to try this tool.

Simply download Teracopy and drag and drop the problematic files to it. Click More > Delete to remove the problematic files from your PC. As you can see, this is a rather simple solution if you need to remove those files, so be sure to try it out.

4. Copy or move those files to a different folder

In most cases, you won’t be able to open files due to this error, but you might be able to move them. Simply find the problematic files and move them to a different directory.

You can create a new directory in your root folder, such as C: or D, and copy your files there. After doing that, you should be able to access the copied files without any issues.

5. Add those files to an archive

If you’re getting this error while trying to access certain files, you might be able to fix it with this workaround. You need to add the problematic files to an archive, and you’ll be able to move them easily.

In addition, you can also extract the files to a different location to access them. Keep in mind that archiving can be a slow process depending on the size of your files, so it might take a while to archive all files.

You can archive files without third-party tools; to do that, you need to right-click the file or folder you want to archive and choose the Add to archive option.

Several users also recommend using the 7-zip tool to fix this problem. According to them, you can use this application to create a zip archive, but you can also use it to remove problematic files from your PC.

6. Use Command Prompt

  1. Press the Windows key, type cmd, and click Run as administrator under Command Prompt.
    cmd admin the filename or extension is too long
  2. Once the Command Prompt opens, type the command below and hit Enter: subst X: "C:Path_to_the_problematic_file"problematic
  3. After the command is executed, you should be able to access X: drive and all the problematic files.

If you’re an advanced user, you can easily fix this problem using Command Prompt. You can assign a folder path to a drive letter using this tool. This method allows you to use the newly created drive letter and access the problematic files.

Keep in mind that this solution is for advanced users, so if you’re not familiar with Command Prompt, you might be unable to perform it properly.

It’s also important to mention that we could not see new drives on our PC, but we could access them using Command Prompt. If you need to remove the newly created drive, you can enter subst x:/d in Command Prompt.

7. Use Total Commander

If you can’t access your files due to The filename or extension is too long error message, you might want to try using Total Commander. This is a dual-pane file manager, and you’ll be able to access these files easily.

Total Commander is a shareware tool, but you can download it for free and try to fix this problem with it. If you’re not a fan of this application, you can try using any other file manager.

Several users reported that they deleted the problematic files using GoodSync Explorer, so you can also try that tool.

8. Use Long Path Fixer

Several users reported that you can easily fix this problem using Long Path Fixer. This is a freeware application, and it will allow you to rename, copy or delete problematic files.

In addition, you can try using tools such as Long Path Eraser Free or Ant Renamer. All these tools are free, and you can use them to rename problematic files or folders and get access to them.

9. Use Command Prompt to rename files or folders

9.1. Show hidden files

  1. Open File Explorer.
  2. Click the View tab and check File name extensions and Hidden items. By doing so, you’ll reveal all hidden files and extensions.

Before you can rename your files, you need to reveal hidden files, folders, and extensions. You can do that with ease by following the steps above.

9.2. Rename the file

  1. Start Command Prompt as administrator.
  2. Once the Command Prompt starts, type the command below and hit Enter: REN "C:\Path_to_the_problematic_file\ProblematicFile.txt" "File2.txt"file 2

Remember to enter the correct path to the problematic file and the file extension. We used ProblematicFile.txt as an example, so replace it with the actual file name giving you this error.

If you have multiple files that you can’t access, you might want to try changing the name of the folder. To do that, do the following:

  1. Open Command Prompt as administrator.
  2. When Command Prompt opens, type the command below and hit Enter: REN "C:\Path_to_the_problematic_folder" "New Folder Name"new folder
  3. Be sure to select the folder that has the longest name and rename it to make it shorter.
  4. After renaming the folder, you should be able to access the problematic files without any problems.

The filename or extension is too long error message can prevent you from accessing your files or folders due to their long path, but you can circumvent this problem by renaming them.

This is a bit advanced solution, so it might not be suitable for basic users. If you’re unfamiliar with Command Prompt, it might take a few tries to rename your files or folders properly.

10. Upload the file to Dropbox and rename it

This is a simple workaround, and it’s perfect if you can’t access a couple of smaller files. You can also use this solution with larger files, but since it requires you to upload files to Dropbox, it’s better to use it with smaller files.

Find the problematic file and upload it to Dropbox to fix the problem. After the file is uploaded, open your Dropbox storage, rename it, and download it again.

If you use automatic synchronization for Dropbox, the file will be automatically downloaded to your PC, and you’ll be able to access it without any issues.

11. Make changes to Group Policy

  1. Pressthe Windows key + R, type gpedit.msc, and click the OK button.
  2. Once Group Policy Editor starts, in the left pane, navigate to Local Computer Policy > Computer Configuration > Administrative Templates > System > Filesystem. Now locate Enable NTFS long paths in the right pane and double-click it.
  3. Select the Enabled option and click on Apply and OK to save changes.
  4. Close Group Policy Editor, restart your PC, and check if the problem is resolved.

According to users, Windows 10 brought some improvements related to path character limits. In previous versions of Windows, users were limited to 260 characters for paths, but this limitation can be lifted in Windows 10.

If you can’t access Group Policy Editor on your version of Windows, you can also remove this limitation by using Registry Editor. To do that, follow these steps:

  1. Press the Windows key + R, type regedit, and click OK.
  2. When Registry Editor opens, navigate to the path below in the left pane: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
  3. In the right pane, locate and double-click LongPathsEnabled DWORD. If this key isn’t available, you’ll need to create it manually.
  4. To do that, right-click the space in the right pane and choose New > DWORD (32-bit) Value. Enter LongPathsEnabled as the name of the new DWORD and double-click it to open its properties.
  5. Once the Properties window opens, set the Value data to 1 and click OK to save changes.
  6. Close Registry Editor and restart your PC.

If you don’t want to edit your registry manually, you can use this zip file and the files inside to apply changes instantly.

Simply run the Remove 260 Character Path Limit.reg file from the archive to remove file path limitations. You can also run the other file from the archive to enable the limitation again.

Irrespective of your chosen method, enabling this option will allow you to access any file path without issues, so try this solution out.

The filename or extension is too long message and ERROR_FILENAME_EXCED_RANGE error can appear on any PC, but you should be able to fix them easily by using one of the solutions from our article.

If you can’t delete a file on your PC, check our detailed guide to rectify the issue quickly.

Feel free to let us know the solution that helped you fix this issue in the comments below.

More about the topics: files, windows 10