Total length of a path and folder name length

C

cpliu

With HD formatted in NTFS running under Windows XP and 2000:

What is the limit of total characters allowed for a folder?
What is the limit of total characters allowed for a path with multiple
folders?

I have a path of many folders (folders inside folders) and I found I
cannot copy the files to another drive. I got:

"Cannot copy <folder name here>: The filename you specified is invalid
or too long. Specify a different filename."

I played around with different options.
1) I decreased the lengths of different folder names in the same path.
It appears I could add more char to a folder. I couldn't add any more
char after the path reaches 246 characters. Strangely, I could rename
the folder from the root directory and put it back in. Is this a bug of
the system?
2) After I did that, I found I couldn't delete any files with illegal
length of the total characters in the path. I'm stuck with files and
folders that I cannot delete. I cannot move and I cannot open the files
either.

How can delete a folder/files that is too deep in path? I think the
system should not allow you to move folders into a folder that would
make the path length illegal.


Any suggestions to save my files?

Thanks,

cpliu
 
B

Bugs B.

Hello,

According to a Windows MOC (course book) the maximum directory and / or
filename is 255 characters.

To be honest: I would not know why you would want to test this with serious
files.
About deleting: you tried the dos prompt delete(s): del?
Try running chkdsk too, it gave me once errors with too long filenames and
suggested corrections.

Success!
 
C

cpliu

Hello,

According to a Windows MOC (course book) the maximum directory and /
or filename is 255 characters.

To be honest: I would not know why you would want to test this with
serious files.
About deleting: you tried the dos prompt delete(s): del?
Try running chkdsk too, it gave me once errors with too long filenames
and suggested corrections.
Thanks for the reply. I did it on a duplicates of files so I can mimic
the long names. I rebooted and started to decrease the length of names
in the path, and eventually I could delete all the folders and files.

I think it's a design flaw that the OS (both 2000 and XP) allows a user
to move folders of long names to a a folder that would make the path
illegal. If it would cause problems, disallow the action with an
explanation.


Thanks,
 

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