Windows 10: max path length - inconsistency

Discus and support max path length - inconsistency in Windows 10 Network and Sharing to solve the problem; I came across a strange problem recently and so far I am not able to find a reason for this behavior I have a very deep folder structure with two... Discussion in 'Windows 10 Network and Sharing' started by AndreasAu, Jan 28, 2021.

  1. AndreasAu Win User

    max path length - inconsistency


    I came across a strange problem recently and so far I am not able to find a reason for this behavior

    I have a very deep folder structure with two files. This folder is actually a Sharepoint Team Site synced with OneDrive fB


    File 1 - synced from sharepoint:

    "C:\Users\[my username]\[company]\[Folder1]\[Folder2]\[Folder3]\[Folder4]\[Folder5]\[Folder6]\[Folder7]\[Folder8]\file1.jpg"

    in total, this path is 247 characters long. I can rename the file to whatever I like, as long as I do not get longer than 247.


    File 2 which is actually a copy of file1 I made in Sharepoint - so it is synced from sharepoint:

    "C:\Users\[my username]\[company]\[Folder1]\[Folder2]\[Folder3]\[Folder4]\[Folder5]\[Folder6]\[Folder7]\[Folder8]\file2_longname.jpg"

    I can rename this to anything up to 259 characters in total - just as you would expect.


    File 3 which is actually a copy of file1 I made in my local explorer:

    "C:\Users\[my username]\[company]\[Folder1]\[Folder2]\[Folder3]\[Folder4]\[Folder5]\[Folder6]\[Folder7]\[Folder8]\file3_longname.jpg"

    I can rename this to anything up to 259 characters in total - just as you would expect.


    If I rename the file1 in sharepoint to any longer name, I can also rename the file in explorer to up to 259 characters. Until I shorten it down to the original 247 characters which I can not exceed anymore. If I go below 247, I can always return up to 247.


    What is this behavior?

    Why am I not able to rename file1. And how do normal users know where the limit is at, if it is - for some reason - below 259?



    Update:

    Just after posting this, I found another quite interesting point. The problem is not this one specific file!

    If I create a new file in explorer, the path can get up to 247.

    If I create a new file in sharepoint, the path can exceed 247.

    If path > 247 && path < 259 then I can rename up to 259

    if path <= 247 I can rename up to 247


    So, I think I at least found the consistency in this, but I still miss the reason. I do not know about a path-limit of 247

    :)
     
    AndreasAu, Jan 28, 2021
    #1

  2. Open File dialog cannot open multiple files if some (but not all) of them have paths that exceed the max path length

    More of a bug report than a question...

    The native Open File dialog fails with the following error message when you try to open multiple files from the same folder and some (but not all) of them have paths that exceed the max path length.

    "You can choose multiple items only if they are all located in the same folder."

    I assume this happens because Windows will prefix the path with \\?\ if the path of a selected file is too long (see

    https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation
    ). Now, if only some of the selected files have a path that is over the limit, only some of the files will have that prefix. No longer do all files have the
    same parent path! Windows is apparently doing a rather simplistic check (like a string comparison) to see whether selected files are in the same directory.
     
    Coloneljesus, Jan 28, 2021
    #2
  3. 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, Jan 28, 2021
    #3
  4. max path length - inconsistency

    Path length limit

    I want to install Python. Should I disable the path length limit? Are there any negatives to doing so?
     
    JohnRamos2, Jan 28, 2021
    #4
Thema:

max path length - inconsistency

Loading...
  1. max path length - inconsistency - Similar Threads - max path length

  2. Can a Maximum Path Length Limitation deactivation cause problems?

    in Windows 10 Network and Sharing
    Can a Maximum Path Length Limitation deactivation cause problems?: Dear Microsoft Community, I have a question about the path length in Windows. This is 260 characters by default, isn't it? However, now I read that you can disable it. Here is an official article:...
  3. 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...
  4. 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...
  5. 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...
  6. Windows 10 Max path of 256 characters.

    in Windows 10 Network and Sharing
    Windows 10 Max path of 256 characters.: I have tried again today to lift this restriction on Windows, but to no avail. None of the two methods posted here https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation seems to be working. neither the method through the gpedit tool. Is...
  7. How do I change the max sound effect length?

    in Windows 10 Ask Insider
    How do I change the max sound effect length?: I would like to change a sound effect, but my wav file is a little too long. Would compressing it help? Do I have to trim it? I'll even edit the registry if I have to. Thanks in advance! submitted by /u/_sample_text_here [link] [comments]...
  8. Path Lengths on Different Drives

    in Windows 10 Network and Sharing
    Path Lengths on Different Drives: I have files on a desktop drive and it does not have an issue with the Path Lengths. On another drive in the same machine if I copy the data it gives me the Path Too Long error if I copy it to that drive. I have already used Regedit to turn on allowing long path names....
  9. 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
  10. System Path variable length problem

    in Windows 10 Support
    System Path variable length problem: I was having a problem with Apple's SyncServer.exe (part of iTunes). It was choking on the length of my system PATH environment variable (2388 bytes), so I temporarily hacked it below 2047 bytes, and it worked OK. BUT I couldn't use Control panel/System/Advanced Systems...