need 1-2-3's of using long file names

G

greensteak

Hello.

Windows XP with NTFS allows me to use up to 255 characters in a file
name.

Sometimes, when copying, moving and deleting, it then decides that even
though it let me create files and folders with these long names,
they're too long to do those tasks.
Problems occur.

Taking into account the fact that we all work with modern third party
software, what are some good ground rules to adhere to?

For instance, avoid using spaces?
Avoid names over 50 characters instead of 255?

Thanks

GS
 
M

Mike Williams

Hello.

Windows XP with NTFS allows me to use up to 255 characters in a file
name.

Sometimes, when copying, moving and deleting, it then decides that even
though it let me create files and folders with these long names,
they're too long to do those tasks.
Problems occur.

Taking into account the fact that we all work with modern third party
software, what are some good ground rules to adhere to?

For instance, avoid using spaces?
Avoid names over 50 characters instead of 255?

Avoid creating them in special shell folders like My Documents, which
have a hidden pathlength tax i.e. it's really C:\Documents and
Settings\<ProfileName>\Documents

Also note that even modern software (like say Windows Media Player 10
and Google Picasa still botch hi-ANSI characters), even though they
should do Unicode names.

Various caveats about any file that needs to be copied to CDFS.
 
H

HeyBub

Hello.

Windows XP with NTFS allows me to use up to 255 characters in a file
name.

Sometimes, when copying, moving and deleting, it then decides that
even though it let me create files and folders with these long names,
they're too long to do those tasks.
Problems occur.

Taking into account the fact that we all work with modern third party
software, what are some good ground rules to adhere to?

For instance, avoid using spaces?
Avoid names over 50 characters instead of 255?

Thanks

GS

Stick with 8.3. You can't go wrong.
 
G

Guest

I've noticed these problems - and they mostly occur with favorites or
bookmarks.

If that's the case, the site that helped you to create that bookmark is a
problem - and I'd suggest avoiding them in the future.

Otherwise, use the KISS principle when naming files. How often are you
going to need to distinguish 2 files (each with 255 characters in the name)?

Also, you can use the date in the filename (such as 20060206 for Feb 6,
2006) to help with the sorting.

- John
 
G

Guest

Oops! I forgot the best part of all!

In most files (I haven't checked them all) there's a remarks or comments
section on the Properties page. Use that for further descriptions if needed.

- John
 
G

greensteak

Mike said:
Avoid creating them in special shell folders like My Documents, which
have a hidden pathlength tax i.e. it's really C:\Documents and
Settings\<ProfileName>\Documents

Also note that even modern software (like say Windows Media Player 10
and Google Picasa still botch hi-ANSI characters), even though they
should do Unicode names.

Various caveats about any file that needs to be copied to CDFS.


David said:
Your whole path is max 260 with the name 255.




I don't use the My Documents folder, but from what I gather my paths
are the culprit.

Let me see if I got this straight:

For instance, If my path "C:/......" contains 255 characters, then my
filename could be no longer than "a.xyz", a total of 260 characters.

I did an experiment, by naming a file "QQQQQQ...txt" until the OS would
no longer let me add another Q. The total path and file,
c:/qqqq........txt was indeed 260 characters.

Thanks for that insight.

And to be more specific on some of the problems I've encountered, I
occasionally get error messages that say something like "WINDOWS CANNOT
DELETE (substitute copy and move) THIS FILE BECAUSE THE FILENAME IS TOO
LONG". It doesn't always reveal which file it's talking about, but
sometimes it does.

So what's going on here is that the file I want to move, copy or
delete, which presently resides in a <260 character path/filename
combo, is attempting to go to a different location where the path
length would push the path/filename combo to >260. This evidently
includes the Recycle Bin. That is the reason I get the error message.

This also might explain why some files won't restore to a different
location using backup software, since the path/filename combo of the
destination location might be >260 characters.

Thanks to all for the help,

GS
 
D

David Candy

Understand that XP can do paths up to 32000 characters. It's programs that can't do more than 260.
 
G

greensteak

David said:
Understand that XP can do paths up to 32000 characters. It's programs that can't do more than 260.

So, in my experiment earlier today, it was the limitations of WIndows
Explorer that constricted the path/filename character limit? Or was it
Notepad.exe? Nevertheless, I think I get the point.

I wonder how Vista will be, that is, will it's bundled Microsoft
programs have these same restrictions as the programs of the past?
We'll see.

Thanks again.

GS
 
D

David Candy

Of course it will. 99.9% of programs only expect 260 chars. Therefore they only allocate this much memory. MS, who knows this, requires that programs use a special naming syntax (which indicates to windows that the program can handle more than 260) to access the 32K path so it doesn't return more data than the program expects.

You can use this syntax (prefix of \\?\) at the command prompt.

\\?\c:\somefolder\somefile.ext
 

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