How do I find files with a path length greater than 260 characters in Windows?
Ever since Windows 95, Microsoft has only allowed file paths up to 260 characters (which, to be fair, was much nicer than the 8 character limit previously). Now, with a registry tweak, you can exceed that amount in Windows 10. Show
As pointed out by the How-To Geek, to enable long file paths, you’ll need to edit the registry. Start by following these steps:
Now you’ll be able to use much, much longer file paths. The one caveat is this may cause some compatibility problems with older 32-bit applications. If you don’t use anymore 32-bit software or simply have a strong need for very long file paths, this tweak should help you. How to Make Windows 10 Accept File Paths Over 260 Characters | How-To Geek Who is this article for? Incydr Professional, Enterprise, Horizon, and Gov F2 Incydr Basic, Advanced, and Gov F1 Instructor, no. Incydr Professional, Enterprise, Horizon, and Gov F2, no. Incydr Basic, Advanced, and Gov F1, yes. OverviewIf you are using the Windows operating system and your backup status isn't reaching 100%, one possible cause could be that you are backing up file paths and names that exceed a 255-260 character limit. This article provides a technical explanation for this issue and a recommended solution. AffectsThe Code42 app running on Windows (all versions, x86 and x64) Before you beginIf you haven't done so already, you may want to start by reading our Windows solutions guide for Unable to Back Up X Files issues. Under the hoodMicrosoft has a core set of application programming interfaces (APIs) that programmers can use to interact with applications in the Windows operating system. These programming interfaces are often referred to as the Windows API. The Windows API imposes a maximum filename length such that a filename, including the file path to get to the file, can't exceed 255-260 characters. However, because this is a limitation of the Windows API and not the file system used on the majority of Windows installations (NTFS), some programs can create filenames that violate this limit. When the Code42 app attempts to read these files for backup, it fails because Windows doesn't know how to handle the file. When this occurs, the following error message displays in the Code42 app service.log: WARN W196815609_BQTodoWkr 2.os.win.metadata.WindowsMetadataHandler] Problem getting named streams for file={filename}, e=java.io.FileNotFoundException: Could not open file...handleValue is invalid {filename}
DiagnosingSymptoms of this issue include:
It can be difficult to correct this issue. If you try to rename, move, or delete the file in Windows, you may receive the following messages: Recommended solutionSince you are not
able to move the files using Windows Explorer, you must use the The simplest way to fix this is to:
You can do this using either of the methods described below. Method 1: Use the subst command to assign a drive letter to a specific folderYou can substitute a specific folder path with a drive letter using the Windows Command Prompt and the subst For example, if you
wanted to replace the folder path subst Y: C:\Example\File\Path Now the After you move the files, you can delete the virtual drive by running the subst Y: /d Method 2: Use visual subst to assign a drive letter to a specific folderIf you aren't comfortable using the Windows Command Prompt, there is a free utility called Visual Subst that you can use to achieve the same results. Code42 does not create or test this software. If you choose to use it, we cannot provide support. Information about the program and an example of its usage can be found at:
External resources
Related topics
Why does Windows have a 260 character limit?The 260-character path limit is due to fixed buffers in the runtime library for DOS/Windows path processing (e.g. ANSI <=> Unicode, working directory, and DOS<=>NT path conversion).
What is 260 character max path limitation?In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating null character.
What is the maximum character limit for file names in Windows?Microsoft Windows has a MAX_PATH limit of ~256 characters. If the length of the path and filename combined exceed ~256 characters you will be able to see the path/files via the Windows Explorer, but may not be able to delete/move/rename these paths/files.
|