• Re: PSA: How to overcome the 260-character Windows shortcut field limit

    From JJ@3:633/10 to All on Fri Oct 16 16:35:05 2026
    On Fri, 16 Oct 2026 08:28:17 +0100, Andy Burns wrote:
    Maria Sophia wrote:

    PSA: How to overcome the 260-character Windows shortcut field limit
    Is the shortcut limit different from the general path limit?

    If not, doesn't it go away for Win10/Win11 with a registry setting?

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem] "LongPathsEnabled"=dword:00000001

    That setting is only for the kernel side of the file-system handling, which
    is a relatively new software support (since Windows 10).

    Applications may hard-code the 260-character limit in their own code, in
    order not to bother checking error code.

    If that setting is already enabled and the system has been restarted (for
    the setting to take effect), and the shell still limit paths to 260
    characters, then the shell is not yet updated to take advantage of that setting. By "shell", I meant the shell library. e.g. SHELL32.DLL,
    SHLWAPI.DLL, etc.

    The LNK shortcut file format itself is not limited to 260 characters for strings. For ANSI typed strings, they're stored as a NULL-terminated string (thus no length limit). For Unicode typed strings, they're stored as a
    finite string length where the length is defined as an unsigned 16-bit
    integer. Meaning that, Unicode strings can be up to 65534 bytes or 32767 Unicode characters. Note: Windows' native Unicode format is UTF-16. Not
    UTF-8.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)