Maximum filename length in NTFS (Windows XP and Windows Vista)?

前端 未结 14 1925
再見小時候
再見小時候 2020-11-22 14:46

I\'m designing a database table which will hold filenames of uploaded files. What is the maximum length of a filename in NTFS as used by Windows XP or Vista?

14条回答
  •  我在风中等你
    2020-11-22 15:42

    Actually it is 256, see File System Functionality Comparison, Limits.

    To repeat a post on http://fixunix.com/microsoft-windows/30758-windows-xp-file-name-length-limit.html

    "Assuming we're talking about NTFS and not FAT32, the "255 characters for path+file" is a limitation of Explorer, not the filesystem itself. NTFS supports paths up to 32,000 Unicode characters long, with each component up to 255 characters.

    Explorer -and the Windows API- limits you to 260 characters for the path, which include drive letter, colon, separating slashes and a terminating null character. It's possible to read a longer path in Windows if you start it with a \\"

    If you read the above posts you'll see there is a 5th thing you can be certain of: Finding at least one obstinate computer user!

提交回复
热议问题