File management: The basics

Syllabus | Schedule | Portfolio | Tools | Lessons | Semester project | CAI class wiki | Home

Before you create a single file or directory, you have to consider what sort of file naming system and directory structure you are going to use. If you don't get things right in the beginning, it will cause problems for you later.

File naming

  • File and directory names must not include spaces. Each file and directory name must be an unbroken string of letters and/or numbers. NO: my diary.html YES: mydiary.html. If you created a file in Word or some other program, and you want to convert it to html, that's fine (though not recommended.) Just be sure the file name is an unbroken string.
  • File and folder names may include an underscore: my_diary.html
  • File names should be short and descriptive. For example, this file is named fileman.shtml, for 'file management'.
  • It is best for a number of reasons to only use lowercase letters.

Directory naming and structure

  • As with file names, directory names should be short, descriptive, and made up of letters and/or numbers only. There can be no spaces in directory names.
  • Organize files in directories according to a logical plan. Most website designers put their media, such as sounds and images, in one folder, and their html files in different folders. For my website here at NPUE, I have all my html files organized according to class. So, for example, all my files for this class, CAI, are in one directory, while all the files for the English 400 class are in another.
  • If in doubt, stop! Don't go wild creating numerous files and folders until you've given it some serious consideration. Once you've created a website with 100 pages and 10 directories, it's very difficult and time consuming to change the filenames and directory names, not to mention what directories the files are in.