No announcement yet.

Maximum Path Length Limitation

  • Filter
  • Time
  • Show
Clear All
new posts

  • Maximum Path Length Limitation

    Hi, I am stuck with an issue here at work and I was hoping to get a better understanding or even a solution to fix this.

    We are getting ready to shut down an old file server due to its age and lack of support.

    I am in the process of moving all of the contents from that server to the individual clients machines. Except I keep getting errors at the end of the transfer telling me to shorten the name or the path. We'll I tried that and most of the time it doesn't work for me. and BTW I've about 2,200 files per client to rename.

    My main question is. If Windows has a 260 character limit. How was the original path allowed to be created?

    Secondly, is there any simpler way to get through this rather than renaming thousands of files?

  • #2
    Re: Maximum Path Length Limitation

    Normally you move it from a root folder to another one, for example
    Old Server: D:\<very long path\filename.txt
    New Server: D:\from old server\<very long path>\filename.txt
    and the additional folder is enough to push it over the edge

    Note also that longer unicode paths may be supported:
    Last edited by Ossian; 16th January 2012, 17:11.
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    IT Trainer / Consultant
    Ossian Ltd

    ** Remember to give credit where credit is due and leave reputation points where appropriate **


    • #3
      Re: Maximum Path Length Limitation

      I run into this all the time when migrating file servers. It occurs usually because users map a drive to a directory lower in the hierarchy. The limit is based on the logical path and not the physical path on the server.

      To get around this I usually map a drive on the source and destination so that the path is relative to what the users would use. Keep this in mind when doing the final placement of the files. You can't make the path longer for the users, you need to keep it the same length or make it shorter.

      Network Consultant/Engineer
      Baltimore - Washington area and beyond


      • #4
        Re: Maximum Path Length Limitation

        Of course the long path names shoulde be fixed in the end - But for now to be able to continue moving the files to the individual clients machines, have you tried Robocopy? The default setting is that robocopy supports very long paths.

        Alternatively you can ZIP the folder first then copy the zip file.

        Or, like JeremyW suggested already, share a folder somewhere down the directory. In the scripting forum here, you can find a script that searches the computer for paths and names that are to long.

        Or else try the following path notation for local files:
        or for a unc path,
        To specify an extended-length path, use the "\\?\" prefix,
        it works for a couple of commands to work around the path length limitation.

        Last edited by Rems; 28th January 2012, 19:57.

        This posting is provided "AS IS" with no warranties, and confers no rights.


        ** Remember to give credit where credit's due **
        and leave Reputation Points for meaningful posts


        • #5
          Re: Maximum Path Length Limitation

          REMS' Robocopy suggestion is good.

          If, in the future you decide to rename, then this little beauty will save you a lot of work:

          It is a free bulk rename utility. It can do all sorts of things and is highly configurable. Even better, it uses a GUI
          A recent poll suggests that 6 out of 7 dwarfs are not happy


          • #6
            Re: Maximum Path Length Limitation

            I have been working through 900Gig of student data that needs to be deleted. There are deliberate folder depth violations of "New Folder\New Folder\..." etc but the worst aspect I am finding is the files that have been created by Mac OS clients with all the Apple 'guff' for iThis and iThat - I am yet to find someting that will work on the entire tree - due to these posts I am going to try Robocopy so thanks for raising the issue.


            • #7
              Long path tool is a great tool for fixing problem.