Click to See Complete Forum and Search --> : File names: !£%^&*()_+{}:@~<>?


tefnut
04-24-2006, 05:30 AM
Iv just started working for a publishing co, and will be doing some web work for them.

I have discovered to my horror that they have all kinds of silly characters in their file names including web pages and related images and folder names.

Before I put them straight I just want to make sure that it is universally recognised that characters like '&' and '.' for example are a really bad idea for naming stuff, especially the web. I'm right here arnt I, but dreading telling them. I guess they could make the transition gradually.

What do you all think?

schizo
04-26-2006, 08:59 AM
Yeah that's not good, the only special character I would use would be the underscore _

felgall
04-26-2006, 06:46 PM
The only characters you can be sure will always work are letters, numbers, and underscores. Anything else makes the page inaccessible in some browsers.

David Harrison
04-26-2006, 07:43 PM
Dot's, ".", are commonly used, apart from to distinguish the file extension, it's also used in version numbers.

Basically, the way I see it, any file name is fine, so long as when you type it in (if you're using Windows) it doesn't say, "You can't use this character in a file name." Or something similar.

Any filename that is legal on a PC, should also be legal on the web.

However, with that said, I don't of any authoritative recommendations or specifications that dictate what is legal and illegal in a file name, though I'm sure they exist somewhere.

felgall
04-26-2006, 11:11 PM
Most web servers run on Linux so you need to stick with characters that are valid on that OS as well. Dots have special meanings when in certain positions in filenames so you need to be careful how you use them (eg. a leading dot means that the filename should be hidden).

David Harrison
04-27-2006, 12:09 AM
Also, on Linux servers, filenames are case sensitive. It's not a problem if you have a consistent way of naming the files, such as camel hump naming, but if not it might be best to just stick with all lower case.

tefnut
04-27-2006, 08:46 AM
when i was using the W3C xhtml validator it flagged up file names that had a '&' it said they should be &amp; this was when a folder had an & in it, but my version of DW kept putting it back to & again. Which then wouldn't validate. So I think in this specific case odd characters are a bad idea.

Id prefer to play it safe will all of the file and folder names I make by not including spaces as well as odd characters, you never know when a file might be used on an older version of Windows or other old OS.

When I was at college I was guilty of putting a '&' in a file name, we had 386 there and my poor IT tutor had to go into dos to rename it because it wouldn't show as a file on the disc. I was in no uncertain terms told not to use them.