The Filename or Extension Is too Long? Here's a Fix
Creating a network drive should fix this issue for good
6 min. read
Updated on
Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more
System errors can occur sooner or later, and many users reported having an ERROR_FILENAME_EXCED_RANGE error It’s often followed by the filename or extension is too long error message.
What to do if the filename or extension is too long?
1. Create a Network Drive
- Locate the folder that contains the problematic file and right-click it. Choose Share with > Specific people from the menu.
- 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:
- Open This PC. Click the Computer tab and choose the Map network drive option.
- Select the desired drive letter and folder path. Be sure to uncheck Reconnect at sign-in option and click the Finish button.
- Once you’re done, you’ll see a new drive available and can use it to access the problematic files.
2. Add those files to an archive
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.
3. Use Command Prompt
- Press the Windows key, type cmd, and click Run as administrator under Command Prompt.
- Once the Command Prompt opens, type the command below and hit Enter:
subst X: "C:Path_to_the_problematic_file"
- After the command is executed, you should be able to access X: drive and all the problematic files.
4. 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.
5. Use Command Prompt to rename files or folders
5.1. Show hidden files
- Open File Explorer.
- 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.
5.2. Rename the file
- Start Command Prompt as administrator.
- Once the Command Prompt starts, type the command below and hit Enter:
REN "C:\Path_to_the_problematic_file\ProblematicFile.txt" "File2.txt"
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:
- Open Command Prompt as administrator.
- When Command Prompt opens, type the command below and hit Enter:
REN "C:\Path_to_the_problematic_folder" "New Folder Name"
- Be sure to select the folder that has the longest name and rename it to make it shorter.
- 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.
6. Make changes to Group Policy
- Pressthe Windows key + R, type gpedit.msc, and click the OK button.
- 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.
- Select the Enabled option and click on Apply and OK to save changes.
- 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:
- Press the Windows key + R, type regedit, and click OK.
- When Registry Editor opens, navigate to the path below in the left pane:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
- In the right pane, locate and double-click LongPathsEnabled DWORD. If this key isn’t available, you’ll need to create it manually.
- 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.
- Once the Properties window opens, set the Value data to 1 and click OK to save changes.
- 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.
User forum
8 messages