Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
wikipedia says that file name and directory path name size limits should be the same between the older HFS Plus, and the current APFS used in Mojave.
So, about 255 characters for a file name, and a path name has no practical limit.
However, some apps may have built-in limits for file names and path names - it's just not a limitation of the file system itself. More often, you might run into problems when using special characters, but that's just something that you watch out for as a normal user of a computer.
 
I'm having problems opening microsoft word 16.24 documents that are in the 11th level of sub folders with long sub directory names and file names.
 
However, some apps may have built-in limits for file names and path names

This.

Safe guess, if a limit, probably 1024 or 2048 characters.
[doublepost=1557779975][/doublepost]Office has a limit of 259

https://support.microsoft.com/en-us...sages-when-you-try-to-open-an-office-document

This issue occurs because of a 259-character limitation on creating and saving files in the Office products. Also, you receive an error message when you save or open a file if the path of the file meets the following condition for the appropriate program.
 
  • Like
Reactions: CreatorCode
If that 1024 is accurate, that's a lot of characters for a pathname. Even with only 11 levels, you would have to average about 90 characters per level to approach that.
You MIGHT want to look for special characters, not just alphanumeric.

Are those documents on a local drive, or are you downloading those through a net drive, or downloading from a remote server? If the documents are local, can you try moving the files up a few levels, at least as a test?

Ah, and I see that NoBoMac reports a much lower limit from Microsoft, which would now make sense.
If you are using Excel, the limit is even lower, Microsoft says 218 total characters for Excel files. Microsoft also points out that
Note This limitation includes the three characters that represent the drive, the characters in folder names, the backslash character between folders, and the characters in the file name.
hmm... Excel files would only get an average of 20 characters per level. If somebody gets crazy with folder names, then there you are.
 
It works because you have now changed the length of the pathname to the file to something under 259 characters.

For example, if I have a Word document on an external drive, the pathname might be something like this.

/Volumes/MyDrive/MyWorkDocs/2019/05/Work1/Sub2/Sub3/myworkdocument02.docx

That's 73 characters (yes, example is less than 259: Too lazy to make a >= 259 path).

Move to your Documents folder, now you have something like

/Users/myuseridhere/Documents/myworkdocument02.docx

That's now down to 51 characters.

So, if crazy deep with long folder and document names, probably butting up on Office's size limits, and when moved to local drive, truncated a bunch of characters from the pathname. Ie. going from > 259 characters (which Office cannot do) to about 50-70 (which Office can do).
 
Last edited:
That would only be needed for the documents that you expect to use in Office. Possible that other apps wouldn't really need that manipulation.
 
  • Like
Reactions: CreatorCode
Limitations are on the number of bytes rather than characters. Normally they are the same thing but special characters can use up more than one byte. For example, the emoji heart symbol ❤️ is 3 bytes. On the command line I was able to create a file of 255 bytes but no more.
 
Hmm...
I would hope you are NOT using multi-byte characters or emoji in file or folder names. I bet those would be the first that are disallowed by some apps.
 
Limitations are on the number of bytes rather than characters. Normally they are the same thing but special characters can use up more than one byte. For example, the emoji heart symbol ❤️ is 3 bytes. On the command line I was able to create a file of 255 bytes but no more.
That's a limit of HFS+:
https://en.wikipedia.org/wiki/HFS_Plus

Specifically, 255 UTF-16 encoding units, normalized to an Apple-modified variant of Unicode Normalization Format D, which decomposes accents from their base characters.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.