Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to create file names that are longer than 260 charcters so that I can test some software. Does anyone know of a way to create a file name / folder combination that is greater than 260 characters?

share|improve this question
    
You can have a folder/name path greater then 260 characters AFAIK, but some software doesn't play nicely. File names have a hard limit of 255 characters (due to most filesystems), so there's nothing you can do about that. –  Breakthrough Mar 25 '11 at 10:57
    
Yes but how do you create a file greater than 260? –  Nick Mar 25 '11 at 15:41
    
the long and short answers yield the same conclusion - you can't. If you are hitting this limit, then you are doing something wrong and need to consider an alternative data storage method. –  Breakthrough Mar 25 '11 at 16:08

1 Answer 1

For the most part pathnames don't have a limit defined, while the filename limit depends on the filesystem type:

FAT16 = 255 UTF-16
FAT32 = 255 UTF-16
NTFS = 255 UTF-16
ext3 = 255
ext4 = 256

Also, the filename limit may be reduced when under a deep hierarchy.

AFAIK you cannot overreach this limit, and this is why you have file metadata. And if Microsoft says that is their limit, then that's the breaks. I'm just glad we're not stuck with the 8.3 limit anymore. Which software on earth needs such long filenames anyway?

Added some tests cases

# path[100]\path[100]\file[60]

C:\0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\ABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJ>echo "test" > 012345678901234567890123456789012345678901234567890123456789.txt

The system cannot find the path specified.

# too long!

# path[100]\path[100]\file[50]

C:\0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\ABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJ>echo "test" > 01234567890123456789012345678901234567890123456789.txt

# file created
share|improve this answer
    
plm software for example en.wikipedia.org/wiki/Product_lifecycle_management. its pretty easy to get filenames which are HUGE. –  akira Mar 25 '11 at 8:15
    
So you mean systems that don't use proper database back-ends. Ah okay then. In that case the PLM software in question should address this as a technical support issue - not much one can do RE file system limits I'm afraid. –  invert Mar 25 '11 at 8:32
    
no, software where you can download files from the proper database backend into your filesystem. –  akira Mar 25 '11 at 10:51
    
It is possoble to have file/foldernames greater than 255. This question superuser.com/questions/78434/… is evidence. I just do not know how to create them –  Nick Mar 25 '11 at 15:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.