Application icon

Filename Lengths

Macs support a wide variety of file systems. Different file systems have varying maximum filename lengths, case insensitivity and other properties.

Mac filesystems such as APFS and HFS+, have a maximum path component length of 255. However, the size of each component is not necessarily the same for all filesystems. On APFS the maximum path component is 255 UTF8 characters. On HFS+ it is 255 UTF16 characters. If you are attempting to pre-check the length of a file system path component this eventual decomposition can make it difficult as the length of the component may not be the length when decomposed.

The ❨IfLength❩ and ❨Truncate❩ rename template tokens always work on a number of characters, ignoring the width of the characters. For historic reasons, negative numbers will be negated. ie. -5 and 5 are treated as 5.

Similar to the handling of the above rename tokens, the Truncate Variable action statement works on a number of characters and negates negative numbers.

In many cases it may be easier and safer to control the length of path components by selecting the Settings - Rename - Settings - Automatically truncate path components setting.



Unicode Strings