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?
I'm adding this to the above approved answer.
TO BE CLEAR, the reason people believe it to be 255-260 characters is because that is all that Windows Explorer supports. It will error out doing something like a file copy on filenames longer than that. However, a program can read and write much longer filenames (which is how you get to lengths that Explorer complains about in the first place). Microsoft's "recommended fix" in situations like this is to open the file in the original program that wrote it and rename it.