NTFS中最大文件名长度(Windows XP和Windows Vista)?

问题描述:

我正在设计一个数据库表,该表将保存上载文件的文件名. Windows XP或Vista使用的NTFS文件名的最大长度是多少?

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?

文件名的各个部分(即路径中的每个子目录以及最终文件名)均限制为255个字符,并且总路径长度限制为大约32,000个字符.

Individual components of a filename (i.e. each subdirectory along the path, and the final filename) are limited to 255 characters, and the total path length is limited to approximately 32,000 characters.

但是,在Windows上,您不能超过MAX_PATH值(文件为259个字符,文件夹为248个字符).请参阅

However, on Windows, you can't exceed MAX_PATH value (259 characters for files, 248 for folders). See http://msdn.microsoft.com/en-us/library/aa365247.aspx for full details.