How do I change how long file & folder names can be ?

How do I change how long my file & folder names can be ?
Answer
Answer

The path length limit cited in the article referenced by Abdul R is 260.

It depends on the length of the complete path to the file (such as C:\Program Files\filename.txt). Windows limits a single path to 260 characters. This is why you might occasionally get an error when copying a file with a very long file name to a location that has a longer path than the file's original location.

-------------------------------------

However, there are various subtleties that lower that number in practice to 255 (or less) including any spaces.

We begin with the absolute limit imposed by Windows. The operating system API puts a limit (called MAX_PATH) of 260 characters for the complete name with the path included. This number is often quoted. However, actual limits are smaller because of various other restrictions. For example, all names have to have a null terminator at the end. Normally only the computer sees this end marker but it counts as a character so there are really only 259 characters available. (Forgetting to count the null terminator is a common mistake.) Another three characters are used by the drive or volume designation (e.g., C:\). Thus, the limit for naming all the folders and subfolders plus the file is reduced to 256 characters. However, no individual file or folder can have a name longer than 255 characters. This includes spaces and back slashes used as separators. This limit of 255 characters per object is imposed by the way that Windows encodes characters but other considerations usually impose lower limits.

from http://vlaurie.com/computers2/Articles/filenames.htm

---------------------------------------

More details

http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx

=====================

And now, for the grand fanale, the answer to your question:

You cannot change the limit on the length of the path. It is imposed by various requirements and is hard coded into the system. You can adjust the "balance" as between file and folder/sub-folder names. E.g., use short directory names so you can use longer file names.

======================

All of this can be a nuisance to the user. A file name can be OK when originally created but prove too long if the file is to be copied or moved to a different location whose path is longer.

There can be additional complications if files are to be burned to DVD or CD.

Tom Ferguson

Italics are added. They indicate a quote from source as indicated.

TF

87 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated April 30, 2024 Views 50,785 Applies to: