The filename or extension is too long? Here's a fix

Publish date: 2024-07-27
The filename or extension is too long

XINSTALL BY CLICKING THE DOWNLOAD FILE

To fix various PC problems, we recommend Restoro PC Repair Tool:
This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues and remove viruses now in 3 easy steps:
  • Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
  • Click Start Scan to find Windows issues that could be causing PC problems.
  • Click Repair All to fix issues affecting your computer's security and performance
  • System errors can occur sooner or later, and many users reported having ERROR_FILENAME_EXCED_RANGE error. This error is often followed by The filename or extension is too long error message, so today we’re going to show you how to fix 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, and if the file path is too long, you’ll encounter this error.

    Users reported that they were unable to move or access the problematic files due to this error. In order to fix the problem you need to rename the problematic file or change its path. In most cases you’re unable to rename the file, but you can fix the problem by renaming one of the directories that holds this file.

    To do that, simply 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 you’ll be able to access your files once again.

    2. Create a Network Drive

    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 these steps:

  • 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 Share button. For security reasons it’s probably the best to select your user name.
  • 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 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 you can use it to access the problematic files.
  • This is a relatively simple workaround, but if you’re not familiar 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 in order 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. Now click on 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 even 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 just need to add the problematic files to an archive and you’ll be able to move them with ease. In addition, you can also extract the files to a different location in order to access them.

    Keep in mind that archiving can be a slow process depending on the size of your files, so it might take you a while to archive all files. You can archive files without third-party tools, and in order to do that you just need to right-click the file or folder you want to archive and choose Add to archive option.

    Several users also recommend using 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

    If you’re an advanced user, you can fix this problem easily by using Command Prompt. Using this tool you can assign a folder path to a drive letter. By using this method, you can use the newly created drive letter and access the problematic files. To do that, follow these steps:

  • Press Windows Key + X to open Win + X menu and choose Command Prompt (Admin).
  • Once the Command Prompt opens, enter subst X: “C:Path_to_the_problematic_file”and press Enter.
  • After the command is executed, you should be able to access X: drive and all the problematic files.
  • Keep in mind that this solution is for advanced users, so if you’re not familiar with Command Prompt you might not be able to perform it properly. It’s also important to mention that we were unable to see new drives on our PC, but we were able to access them using Command Prompt. If you need to remove the newly created drive, you can do that by entering 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 with it you’ll be able to access these files with ease. 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.

    Expert Tip: Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken. We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
    Click here to download and start repairing.

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

    8. Use Long Path Tool

    Several users reported that you can easily fix this problem by using Long Path Tool. This is a freeware application and it will allow you to rename, copy or delete problematic files. Using this tool you’ll be able to rename long files, delete them or move them to a different location with ease. The application is free to use and completely portable, so feel free to try it out.

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

    9. Use Command Prompt to rename files or folders

    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.

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

  • 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.
  • After doing that, you need to start Command Prompt and use it to rename the problematic files. To do that, follow these simple steps:

  • Start Command Prompt as administrator. We showed you how to do that in Solution 6, so check it for detailed instructions.
  • Once the Command Prompt starts, enter REN “C:\Path_to_the_problematic_file\ProblematicFile.txt” “File2.txt”.
    Keep in mind that you need to enter the correct path to the problematic file as well as the file extension. We used ProblematicFile.txt as an example, so be sure to replace it with the actual file name that is 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, 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.
  • This is a bit advanced solution, so it might not be suitable for basic users. If you’re not familiar with Command Prompt it might take you 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.

    To fix the problem, simply find the problematic file and upload it to Dropbox. After the file is uploaded, open your Dropbox storage, rename the file 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

    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 it seems that this limitation can be lifted in Windows 10. To change the path limit, you need to use these steps:

  • Press Windows Key + R and enter gpedit.msc.
  • 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 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.
  • 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 Windows Key + R and enter regedit. Press Enter or click OK.
  • When Registry Editor opens, in the left pane navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem key. 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 empty 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 use the files inside to instantly apply changes. Simply run 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 in order to enable the limitation again.

    Despite the method you decide to use, enabling this option will allow you to access any file path without issues, so be sure to 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.

    READ ALSO:

    ncG1vNJzZmivmaOxsMPSq5ypp6Kpe6S7zGidoqSVo66usYyer62dnqi2sLqMraaoZZyku6h7