The University of Texas at Austin- What Starts Here Changes the World
Services Navigation


Naming Files and Directories

In general, Macintosh users will have to be more restrictive than usual in naming files and directories. DOS and Windows (pre 95) can be less restrictive.

Avoid spaces
Macintosh users like spaces. UNIX machines and URLs do not. Avoid them. In fact, Fetch, a Macintosh file-transfer program, automatically converts spaces to underscores when transfering files to UNIX machines.

Avoid special symbols
Don't use   &    #   or other odd symbols in your file or directory names.

Avoid redundancy
Don't repeat portions of directory names in the names of files and subdirectories. For example, in a directory called purchasing, you might want to create a staff directory. You might call it staff or purchasingstaff. Since you are already in a directory called purchasing, purchasingstaff would be redundant. Notice the resulting URLs.

  • Good: http://www.utexas.edu/business/purchasing/staff/
  • Redundant: http://www.utexas.edu/business/purchasing/purchasingstaff/

Keep names short and descriptive
Give your files and subdirectories short but descriptive names. Remember, these names appear in your URL. Also, keeping your names short simplifies your URLs. So, if you have to communicate one or your URLs verbally to someone, they are more likely to get it. For example:

  • Good: http://www.utexas.edu/research/
  • Bad: http://www.utexas.edu/Office_VP_Research/

Use lowercase characters only
Unless you have a compelling reason to do otherwise, always use only lowercase characters in file and directory names. Remember, URLs are case sensitive. For example:

  • This works: http://www.utexas.edu/learn/
  • This doesn't work: http://www.utexas.edu/Learn/
    (because L in Learn should be lower case)

Give file names meaningful extensions
File name extensions are three or more characters that follow the file name and are separated from the file name by a period. Extensions convey information about the contents of a file and help Web browsers know how to display or serve a document. For example:

index.html
graphic.gif
newsletter.pdf
movie.mpeg
- An HTML file.
- A graphic file in GIF format.
- A newsletter in PDF format.
- A video in MPEG format.

Use these extension conventions for files that you create. Note that translation programs such at RTFtoHTML automatically append a .html to HTML files that it creates.

Name your primary HTML file index.html
If the primary file in your home directory is called index.html, you need not specify it in URLs. For example, both of these links work, but the shorter one is more conventional and might be easier for others to remember and for you to type:

  • Okay: http://www.utexas.edu/learn/index.html
  • Better: http://www.utexas.edu/learn/

Create an index.html for every subdirectory you create
In general, each subdirectory you create should have an index.html file. Exceptions to this rule might be a graphics subdirectory in which you store graphics files and a forms subdirectory in which you store comments forms.

  Updated 2006 July 26
  Comments to TeamWeb