ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Windows File Explorer 260 Character Limit

    IT Discussion
    2
    11
    771
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DustinB3403D
      DustinB3403
      last edited by

      Where did you see that Microsoft changed the max path character limit from 260 (255 really) to 400?

      syko24S 1 Reply Last reply Reply Quote 0
      • DustinB3403D
        DustinB3403
        last edited by

        Also worth asking/mentioning if you can would reducing the length of these file paths break anything major? I have a powershell script that makes this trivial in the sense that it can remove numerous repeated characters and replace them with a single hyphen or space mark. (really anything you wanted)

        syko24S 1 Reply Last reply Reply Quote 0
        • syko24S
          syko24 @DustinB3403
          last edited by

          @DustinB3403 said in Windows File Explorer 260 Character Limit:

          Where did you see that Microsoft changed the max path character limit from 260 (255 really) to 400?

          Sorry not an official link but near the bottom - https://helpdeskgeek.com/how-to/how-to-fix-filename-is-too-long-issue-in-windows/

          DustinB3403D 1 Reply Last reply Reply Quote 0
          • syko24S
            syko24 @DustinB3403
            last edited by

            @DustinB3403 said in Windows File Explorer 260 Character Limit:

            Also worth asking/mentioning if you can would reducing the length of these file paths break anything major? I have a powershell script that makes this trivial in the sense that it can remove numerous repeated characters and replace them with a single hyphen or space mark. (really anything you wanted)

            Construction client - so they like to have folders setup "Complete Projects\JobName\Change Orders\VendorType\Some long file name.xlxs"

            Part of the issue is that when the data was hosted on their server the shares were mapped so the paths were shorter. With OneDrive the full path shows up as "C:\users\username\Sharepoint CompanyName - Documents Directory...."

            That's a long path by itself.

            1 Reply Last reply Reply Quote 0
            • DustinB3403D
              DustinB3403 @syko24
              last edited by

              @syko24 said in Windows File Explorer 260 Character Limit:

              @DustinB3403 said in Windows File Explorer 260 Character Limit:

              Where did you see that Microsoft changed the max path character limit from 260 (255 really) to 400?

              Sorry not an official link but near the bottom - https://helpdeskgeek.com/how-to/how-to-fix-filename-is-too-long-issue-in-windows/

              Gotcha, yeah that isn't actually a resolution in my mind. One because there are always going to be issues down the road attempting to access Sharepoint with a file path of <255 characters and secondly you're going to end up with all sorts of performance issues from Sharepoint.

              I think fixing the path lengths would make more sense, rather than editing the system registry on each client.

              syko24S 1 Reply Last reply Reply Quote 0
              • syko24S
                syko24 @DustinB3403
                last edited by

                @DustinB3403 said in Windows File Explorer 260 Character Limit:

                @syko24 said in Windows File Explorer 260 Character Limit:

                @DustinB3403 said in Windows File Explorer 260 Character Limit:

                Where did you see that Microsoft changed the max path character limit from 260 (255 really) to 400?

                Sorry not an official link but near the bottom - https://helpdeskgeek.com/how-to/how-to-fix-filename-is-too-long-issue-in-windows/

                Gotcha, yeah that isn't actually a resolution in my mind. One because there are always going to be issues down the road attempting to access Sharepoint with a file path of <255 characters and secondly you're going to end up with all sorts of performance issues from Sharepoint.

                I think fixing the path lengths would make more sense, rather than editing the system registry on each client.

                I agree but again lots of data and lots of renaming to something that still makes sense to them. Plus you always get the "Well we didn't have a problem on the old system".

                DustinB3403D 1 Reply Last reply Reply Quote 0
                • DustinB3403D
                  DustinB3403 @syko24
                  last edited by

                  @syko24 said in Windows File Explorer 260 Character Limit:

                  I agree but again lots of data and lots of renaming to something that still makes sense to them. Plus you always get the "Well we didn't have a problem on the old system".

                  But you would simply respond with the old system worked because it was old, this new system doesn't work because it's new and the way forward. So we need to change the process a bit.

                  As for the renaming, it's a rather automatic setup. I'll grab it and post it so you can see it.

                  syko24S 1 Reply Last reply Reply Quote 0
                  • syko24S
                    syko24 @DustinB3403
                    last edited by

                    @DustinB3403 said in Windows File Explorer 260 Character Limit:

                    @syko24 said in Windows File Explorer 260 Character Limit:

                    I agree but again lots of data and lots of renaming to something that still makes sense to them. Plus you always get the "Well we didn't have a problem on the old system".

                    But you would simply respond with the old system worked because it was old, this new system doesn't work because it's new and the way forward. So we need to change the process a bit.

                    As for the renaming, it's a rather automatic setup. I'll grab it and post it so you can see it.

                    Cool I appreciate it!!

                    1 Reply Last reply Reply Quote 0
                    • DustinB3403D
                      DustinB3403
                      last edited by

                      So here is the script that I use, I use it to remove stupid characters from file and folder names, which also reduces the number of characters in the total path.

                      # Finds special characters in file and folder paths and replaces them with an null-space '' or hyphen (where it makes sense) and allows for quick find and replace functionality that would otherwise mess up a backup sync
                      # All errors are reported at the end of the run, making it easier to find something that needs attention (scroll hell) - should only print *true* errors and not " Source and destination must be different." a ~million~ times
                      # Use against a specific folder IE _Archive of some directory rather than an entire share for speediness otherwise target a drive letter D:\
                      
                      (Get-ChildItem -Path "F:\Complete Projects" -Recurse | Rename-Item -NewName {$_.Name -replace '•','' -replace '®','' -replace '™','' -replace '','' -replace '','' -replace '~','' -replace '$','' -replace '','' -replace '','' -replace '','' -replace '/','' -replace '|','-'} -ErrorAction SilentlyContinue -ErrorVariable daError)
                      if ($daError.Exception.Message -match " Source and destination path must be different.") {
                      	Write-Output "ERROR - There was an error. Pay Attention : [$daError]"
                      	}
                      
                      1 Reply Last reply Reply Quote 1
                      • DustinB3403D
                        DustinB3403
                        last edited by

                        If this client has something like -----Client 1\Change Orders\ for a path you would simple add a -replace '-----','-' which would remove all of the extra hyphens which aren't actually being beneficial in anyway to the process.

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post