File name size limit?

A

Alejandro

Hi, I posted this question some time ago with no luck, so I would like to
give a try again in case there are new info about this. I would like to know
the file name size limit in windows vista (or windows server 2003 if
better). For NTFS the limit is 256 characters and this includes the whole
path like c:\folder1\folder2\folder3....\folderN.
I know Microsoft was working in a new file system and was planning to
include it with Vista but later they removed the proyect from Vista, this
file system was SQL-based and I suppose the limit for the file names would
be greatly increased...but now I dont know.
Any info?
Thanks!
Alejandro.
 
G

Guest

Vista, 2000, XP, etc all support 32000 character file names. However most
programs can't so don't try to use them. Programs have to be programmed to
use the larger name length. And the limit is Max Path 260 and Max Name 256.
 
G

Guest

For a program to let windows know it can handle 32k paths it prepends \\?\
to file names when opening a file. You can do this too in CMD.

copy "\\?\c:\somewhere very long\a very long file bame.txt"
"\\?\d:\somewhereelse very long\a very long file bame.txt"
 
A

Alejandro

this is very interesting, I wonder why is it that sometimes Windows Explorer
let you create as many nested folders as you want but then dont let you
move-copy the folders to another location. Anyways I need IIS to be able to
handle huge amount of nested folders and dont know how can I prepend \\?\ in
that case, is it possible?
 
G

Guest

Don't know. Depends if it was programmed to handle maxpath 32K or 260 (max
name is the same for both at 256). If it's 260 then a 32k path, if you can
pursuade it to use it, will crash it - it will cause a buffer overrun.
 
A

Alejandro

now that you mention that I realize that in fact I havent tried IIS with
very long file names because I always use Windows Explorer to create them.
It would be an interesting test.
Anyways thanks a lot for your comments, I didnt know about the 32k
maxpath...this is using the Win32 API right? correct me if I am wrong but I
am kind of rusty
 
G

Guest

Yes this is win32 API syntax. Remember the NT operating system runs other
operating systems. These are the Windows API rules.
 
A

Alejandro

I am glad that win32 API is eventually been replaced with .net
framework..windows api is kind of obsolete already
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top