Organizing Files and Directories
Macintosh users are used to creating folders. A folder can contain files
and other folders. Likewise, PC users create directories, which can contain
files and other directories. In both cases, you use folders or directories
to organize and categorize your files into logical units.
On UNIX machines, you use directories to organize files, just as you
would on a microcomputer. And as usual, directories can contain files
and other and directories, called subdirectories.
- Create an index.html file 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 that you use on your Web pages and a forms
subdirectory in which you store comments forms.
- Organize files into subdirectories
- Create subdirectories to organize your HTML files by topic. For example,
you might create several subdirectories, including one each of the following:
forms, graphics, newsletters, brochures, etc.
- Plan for growth
- Your Web will never be complete. You will always be updating existing
pages and adding new ones. It's important to plan for that growth at
the outset. The best way to plan for this growth is to create directories
rather than files. For example, suppose you want to serve a departmental
newsletter in your Web. It's a short, simple, 1-sheet newsletter. You
have a decision to make. Do you create a file, named newsletter.html
for this newsletter, or do you create a subdirectory called newsletter
for it? Corresponding URLs would be, for example:
- Okay: http://www.utexas.edu/coc/rtf/newsletter.html
- Better: http://www.utexas.edu/coc/rtf/newsletter/
Many might think that since the newsletter is a simple 1-pager,
it doesn't need its own directory. This is true if you don't plan
to keep old copies around, if there are no graphics associated with
the newsletter, if you don't plan to put each article in your newsletter
in a separate file, and if you are certain that the newsletter will
never grow out of a simple newsletter.html file.