|
About Too Long Filenames
This discussion is relevant to Windows NTFS file system as used by Windows NT and later, unless the FAT file system is specifically mentioned.
How long is too long for a filename?
Anything over 259 characters including the drive specifier, e.g. C:\ or \\Corpnet\w, the path and the filename itself.
As long as the full pathname is less than 259 characters there should not be any problem working with the files except that some programs, and even older file managers, will have shorter limits on the files they can handle, for instance you may be able to copy and rename a file in FileBoss and Windows Explorer but not be able to open it in another program such as a drawing program or word processor.
However once the the length of full pathnames are longer than 259 characters there can be and will be problems.
Unfortunately the exact nature of the problems will depend on the version of Windows, the file system, the location of the storage media (such as across a network) and the programs accessing the file.
Even using Windows Explorer, handling files with filenames longer than 259 characters can be extremely erratic.
FileBoss handles filenames up to 2048 bytes long to varying degrees depending on the version of Windows and the file system in use. On a few systems they can be used almost the same as other files but on most Windows systems there are some limitations, e.g. they may be able to be renamed but not copied or deleted.
Renaming is best
So renaming is always the best option. Once the names, or the folders above the files, have been renamed so that the total path plus the name and extension is 259 bytes or less, the files can be copied, deleted and otherwise manipulated.
Even with extremely long filenames there is still on limit that must be observed, any one element of the full pathname can not be longer than 255 characters. That means that the name of anyone folder in the path, the filename itself and the extension can not be longer than characters bytes. If this limit is exceeded the chances of renaming the file are extremely low.
Why do some say the maximum length is 255 or 260?
Sometimes it is said that the total length is 255 or 260 characters. The 255 is left over from the days of Windows 95 - when Windows first introduced a version of long filenames - and did not include the dot and three character extension. The 260 is used by programmers as it includes the 259 characters and a trailing null byte that terminates the name.
|