Insufficient Memory – XCOPY

IT Support Forum Forums Development General Discussion Insufficient Memory – XCOPY

Viewing 1 reply thread
  • Author
    • #2460

      When copying files with XCOPY, it fails to copy the files and I get the following error:

      Insufficient memory

      First of all it’s worth noting that this error does not mean that your computer has insufficient memory to run xcopy.

      If you get the insufficient memory error, this is because you have asked XCOPY to copy a file or folder whose file path has more than 255 characters in it. The 255 character file path limit is a limitation of XCOPY and the only solution is to change your file / folder structure or use another file copying program which doesn’t have the 255 character limit, such as Robocopy.

      I guess the 255 character limit in XCOPY is a secret, because wouldn’t it have been easier if the error just said that instead of a vague Insufficient memory message?

    • #2461

      An Explanation Of The 255 Character Limit

      I thought I might do a follow up post explaining XCOPY’s 255 character limit that results in the Insufficient memory error. The following file path has 24 characters:


      This is because “C:\” has 3 characters:

      C : \
      1 2 3

      “Folder\” has 7 characters:

      F o l d e r \
      1 2 3 4 5 6 7


      An example of a directory that’s over 255 characters that would trigger XCOPY to report that there’s insufficent memory is:


      The above file path has 259 characters and therefore cannot be copied with XCOPY and will return an Insufficient memory error.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.