Naming files and folders

From WSU Technology Knowledge Base
Jump to: navigation, search

You need to be careful when naming your files and folders.

Why Not Use ...

Why not use characters besides a-Z, 0-9 and '_' (underscore) in website file and folder names?

Because of the problems those non-standard characters can cause!

Examples: Some people like to use file names such as "#3Problem.htm" This is a terrible idea! Web browsers interpret the "#" character as a bookmark and cannot properly determine what the hyperlink means.

How to tell if you have a misformed hyperlink

If you put a space in a file name, when you hover over that hyperlink the space will show up as '%20' in the path name. Other non-standard characters show up as other '%...' values. The '%' sign indicates that the following numeric values are Hexadecimal (base16)

Good rule to follow

This is a good rule to live by not only for file and folder names but also for:

1. Variable names in programming because some programming languages do not allow it.

2. .exe file names in programming, .xls or .xlsx files... because browsers will not download and run these program files!

3. field names in databases because some databases do and some do not allow it, and if you start using spaces you get into problems when you move data and tables between them Access does allow spaces, SQL server does not

4. Virtual PC will not recognize vfd files that contain periods in the file name

5. Adobe Connect will substitute a '+' for a space in a file name. The file cannot be downloaded, so file sharing becomes impossible.

6. Excel will not accept spaces in Named Ranges.

If you run into any more let me know so I can warn others!

Reference

http://www.w3schools.com/tags/ref_urlencode.asp