Windows 10: Lesser-known effect of path-length limitation in File Explorer in Windows 10

Discus and support Lesser-known effect of path-length limitation in File Explorer in Windows 10 in Windows 10 Network and Sharing to solve the problem; Occasionally users encounter an error when dealing with files saved in deep directory structures, due to a limit on the maximum length of a path... Discussion in 'Windows 10 Network and Sharing' started by D.I.V., Aug 11, 2020.

  1. D.I.V. Win User

    Lesser-known effect of path-length limitation in File Explorer in Windows 10


    Occasionally users encounter an error when dealing with files saved in deep directory structures, due to a limit on the maximum length of a path including filename in File Explorer, which is effectively 259 characters excluding a requirednull terminator. I have seen the effects of this before when using either SyncToy or xcopy I forget now which; maybe both.


    It turns out that there are a couple of behaviours in Windows Explorer, under Windows 10 with default settings; i.e. without a registry edit to remove the limit.


    1

    Normally it is possible to copy the path including filename of a file from Windows Explorer by either choosing "Copy as path" from the context menu or through Home > Copy path.

    It turns out that if the length exceeds 260 characters 259 regular characters plus the obligatory <NUL> character, then Windows Explorer automatically copies the path in "short filename" format a.k.a. "8.3 format" / "short name format".


    Thus the path of
    c:\long\path_name\....\no_really\very_long_path_name\the.long_file_name_01234567890123456789_foo.txt
    might get copied to the clipboard as
    c:\long\path_n~1\....\no_rea~2\very_l~1\thelon~4.txt

    ["...." just represents more of the path.]


    2

    Note that I can successfully copy files with longish names to folders with longish names to create paths that exceed the 260-character limit within File Explorer even with the default settings*. I can then open, copy and delete those files.

    However, if I try to make a copy of the file in the same directory by dragging and dropping with the mouse, while Ctrl is depressed — so thatFile Explorer would want to append the suffix " - Copy" to the end before the extension — then the name getstruncated. Not to the 8.3 format, but enough to easily satisfy the path limit.

    What do I mean by "easily satisfy"? What I found is that the new filename will be precisely 10 characters shorter than the maximum allowed taking into account the entire path.


    Thus
    c:\long\path_name\....\no_really\very_long_path_name\the.long_file_name_01234567890123456789_foo.txt
    might get duplicated as

    c:\long\path_name\....\no_really\very_long_path_name\the.long_fil - Copy.txt

    and manually editing this filename would allow it to be expanded as far as e.g.
    c:\long\path_name\....\no_really\very_long_path_name\the.long_fil - Copy0123456789.txt
    c:\long\path_name\....\no_really\very_long_path_name\0123456789the.long_fil - Copy.txt



    I didn't find either of these behaviours documented anywhere else.

    —DIV




    System information:

    OS Name Microsoft Windows 10 Pro for Workstations
    Version 10.0.16299 Build 16299
    System Type x64-based PC

    * This functionality would implicitly be using an extended-length path, with a limitation of 32767 characters in total with each constituent director or file's name being no more than ~255 characters.

    :)
     
    D.I.V., Aug 11, 2020
    #1
  2. SLyHou Win User

    Windows 10 1803 - File explorer path limit 260

    Hello!

    Would there be a way to increase the length that file explorer to display more than 260 length path.

    I have changed the registry to do MAX File Path, but I cannot get file explorer to let me add folders past this limit.
     
    SLyHou, Aug 11, 2020
    #2
  3. Path length limit

    I want to install Python. Should I disable the path length limit? Are there any negatives to doing so?
     
    JohnRamos2, Aug 11, 2020
    #3
  4. Lesser-known effect of path-length limitation in File Explorer in Windows 10

    Path length limit

    Hello John,

    My name is Patricia and I am an Independent Advisor. I am here to help you today.

    Disable the path limit length is recommended after Python setup is successful, because if python was installed in a directory with a path length greater than 260 characters, adding it to the path could fail.

    So don't worry about that action and proceed to it.
     
    Patricia.Guenot, Aug 11, 2020
    #4
Thema:

Lesser-known effect of path-length limitation in File Explorer in Windows 10

Loading...
  1. Lesser-known effect of path-length limitation in File Explorer in Windows 10 - Similar Threads - Lesser known effect

  2. File share Maximum Path Length Limitation

    in Windows 10 Gaming
    File share Maximum Path Length Limitation: Dear Expert, Our company has some issue that the share drive's path more than 256 characters. https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd as I check, it can extend the limitation on that, but I'm confused if I need to enable it...
  3. File share Maximum Path Length Limitation

    in Windows 10 Software and Apps
    File share Maximum Path Length Limitation: Dear Expert, Our company has some issue that the share drive's path more than 256 characters. https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd as I check, it can extend the limitation on that, but I'm confused if I need to enable it...
  4. File share Maximum Path Length Limitation

    in Windows 10 Network and Sharing
    File share Maximum Path Length Limitation: Dear Expert, Our company has some issue that the share drive's path more than 256 characters. https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd as I check, it can extend the limitation on that, but I'm confused if I need to enable it...
  5. Shortcut URL and LNK files seem to have file path length limit

    in Windows 10 Network and Sharing
    Shortcut URL and LNK files seem to have file path length limit: Windows 10 Working on a system that creates folders and files on a network share and then creates URL files Internet Shortcut that point to these files. I have enabled long file paths in Windows using gpedit and/or regedit. I am at least able to create the long path...
  6. Limited File Name Length Problems

    in Windows 10 Network and Sharing
    Limited File Name Length Problems: Windows 10. I am trying to rename a file with a name that is 92 characters long (letters, numbers, and hyphens). I am copying the name from a file folder name and attempting to past that name as the rename for a jpeg. It cuts off the last thirty Characters. I tried typing the...
  7. Windows 10 1803 - File explorer path limit 260

    in Windows 10 Network and Sharing
    Windows 10 1803 - File explorer path limit 260: Hello! Would there be a way to increase the length that file explorer to display more than 260 length path. I have changed the registry to do MAX File Path, but I cannot get file explorer to let me add folders past this limit....
  8. Path length limit

    in Windows 10 Installation and Upgrade
    Path length limit: I want to install Python. Should I disable the path length limit? Are there any negatives to doing so? https://answers.microsoft.com/en-us/windows/forum/all/path-length-limit/412d48cd-7ddf-435a-9935-cf51af16f8a4
  9. Browsers that are lesser-known

    in Browsers and Email
    Browsers that are lesser-known: What are some lesser known browsers that people should check out if they don't want to use any of the mainstream ones (Chrome, Firefox and Edge)? Please, recommend only browsers that are still maintained... because nobody wants to use discontinued programs, right? *Tongue My...
  10. Microsoft Removes 260 Characters Path Length Limit in Windows 10 RS

    in Windows 10 News
    Microsoft Removes 260 Characters Path Length Limit in Windows 10 RS: Microsoft Removes 260 Characters Path Length Limit in Windows 10 Redstone New policy integrated into the latest preview build [img] Windows 10 build 14352, a preview version of the upcoming Anniversary Update (also known as Redstone), comes with an...