Is there a limit on characters in a filename?

P

patrick j

Hi

I'm wondering if there is a limit on the number of characters in a
filename for use in a web-site?

I used to do web-site creation on an amateur basis using the classic
Mac OS and on that there was a limit of the number of characters in the
filename so the issue never arose.

However now I'm using OS X I have found myself creating quite long
filenames.

Should I be concerned about this?

Thank you :)
 
J

Jukka K. Korpela

Scripsit patrick j:
I'm wondering if there is a limit on the number of characters in a
filename for use in a web-site?

On the web, there are URLs, not files. If URLs happen to map to filenames in
a particular server, that's coincidental.

There have been reports on browser limitations with URLs longer than 2,000
characters. If they are an issue to you, then you (or your users) surely
have serious issues.
However now I'm using OS X I have found myself creating quite long
filenames.

Should I be concerned about this?

Yes, definitely. What makes you create quite long filenames? They won't make
your site more useable, will they? Did you ever try writing down even a 200
characters long messy URL in order to be able to visit later, after you
found something interesting when using a foreign computer?
 
D

dorayme

"Jukka K. Korpela said:
Scripsit patrick j:


On the web, there are URLs, not files. If URLs happen to map to filenames in
a particular server, that's coincidental.

There have been reports on browser limitations with URLs longer than 2,000
characters. If they are an issue to you, then you (or your users) surely
have serious issues.


Yes, definitely. What makes you create quite long filenames? They won't make
your site more useable, will they? Did you ever try writing down even a 200
characters long messy URL in order to be able to visit later, after you
found something interesting when using a foreign computer?

Your point about urls is good but this is a different issue to at
least one particular one in the question: apart from url length
limits, apart from user difficulties, what are the limits on file
names themselves? To do with particular server set ups? I have
wondered this myself. Never a problem in fact because I try to
keep the names short. But it is a bit of a temptation for Mac OS
X users (perhaps others too) and can conceivably be useful for
private file management. The question of typing urls need not
actually arise, this is a different issue.
 
R

richard

Jukka K. Korpela said:
Scripsit patrick j:


On the web, there are URLs, not files. If URLs happen to map to filenames
in a particular server, that's coincidental.

There have been reports on browser limitations with URLs longer than 2,000
characters. If they are an issue to you, then you (or your users) surely
have serious issues.


Yes, definitely. What makes you create quite long filenames? They won't
make your site more useable, will they? Did you ever try writing down even
a 200 characters long messy URL in order to be able to visit later, after
you found something interesting when using a foreign computer?


So I run across this url in a newspaper and it has a length of 300
characters. I'm supposed to hand type all of this in? Like hell I will.
chances are the newspaper won't even print it to begin with.
 
T

Thomas Jollans

Hi

I'm wondering if there is a limit on the number of characters in a
filename for use in a web-site?

I used to do web-site creation on an amateur basis using the classic
Mac OS and on that there was a limit of the number of characters in the
filename so the issue never arose.

However now I'm using OS X I have found myself creating quite long
filenames.

Should I be concerned about this?

As already pointed out, files are irrelevant to the WWW, they are merely a
possibility to organize data which may or may not be used on the server
and could by coincidence be used to map URIs to data. (I avoided the term
UR*L* as it is not necessarily given that the data has a location that is
concievable from the URI, which may or may not actually uniformly identify
the data, now I come to think of it.

Back to the question:
YES, it is a problem, as URIs should in most cases be easy to remember or
at least easy to type, not to mention permament.

NO, as *NIX (what runs most of the web) systems all, in theory, allow
infinitely long file names, which ispired Microsoft's Windows to allow
long(ish?) file names as well - which should collectively cover 99.99% of
the web. most of the rest probably has an 8.3 file name restriction, but
you'd know due to the careless violation of the rule you'd been guilty of.
 
D

dorayme

NO, as *NIX (what runs most of the web) systems all, in theory, allow
infinitely long file names, which ispired Microsoft's Windows to allow
long(ish?) file names as well - which should collectively cover 99.99% of
the web. most of the rest probably has an 8.3 file name restriction,

Finally, an answer!
 
C

Chris F.A. Johnson

Hi

I'm wondering if there is a limit on the number of characters in a
filename for use in a web-site?

I used to do web-site creation on an amateur basis using the classic
Mac OS and on that there was a limit of the number of characters in the
filename so the issue never arose.

However now I'm using OS X I have found myself creating quite long
filenames.

Should I be concerned about this?

Unix systems (which most web servers run on) usually have a
maximum length for filenames defined by the NAME_MAX macro. A
typical value is 255. There is also the PATH_MAX macro, typically
4095, which is the maximum length for the entire path to a file.
 
P

patrick j

Unix systems (which most web servers run on) usually have a
maximum length for filenames defined by the NAME_MAX macro. A
typical value is 255. There is also the PATH_MAX macro, typically
4095, which is the maximum length for the entire path to a file.

Thank you :)

The longest filename I have has 37 characters including the .html
suffix.

Should be okay I think.
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top