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:
C:\Folder\Files\File.txt
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
etc…
An example of a directory that’s over 255 characters that would trigger XCOPY to report that there’s insufficent memory is:
C:\Temp\SharedFolders\Sub_Folders\MyFilesAndFolders\FoldersBeginningWithR\RecentFoldersAndFiles\Folder1\Images\Photos\SharedPhotos\PersonalPhotos\Memories_PicturesToKeep_NotTemporary\BackupFiles\PhotosToKeep\PhotosOfMyDog\Rover\2022\February\Tuesday\Rover.jpg
The above file path has 259 characters and therefore cannot be copied with XCOPY and will return an Insufficient memory error.