How to Build a Website
File Management
by Craig Walker

There are a few key rules:


If you name your home page index.htm, that's the first page you want your viewers to access and that includes frame pages, your viewers will not need to write the file name at all because the browser/server will automatically serve up an index.htm file if a file name is not specified and there is indeed an index.htm file in the directory. To access my family website you only need to type members.cox.net/cwalker1. cwalker1 is my home directory and the first file you will see is index.htm, automatically. That's a lot nicer than having people remember the file name too. Neat trick.

When you are constructing your website, you need to keep the files and directories in some logical order. You need a home directory name that has a logical meaning to the website. The home directory for this tutorial website is buildweb. I'll never forget what is in that directory. The directory for the Fun Page, funpage.htm, pictures and accessories is named funpage. Imagine that. I could have called it morestuff or folder2. But then, when I came back to it in 4 weeks for an update, I would have to explore each directory to figure out which was which.

When you publish (upload) your files and directories to the Internet, they should mirror the files and directories on your computer. That way as you edit and rearrange things on your computer, it will be easy to update your internet website. When you are writing your web page code, you make references to files and folders. If they work on your computer, they should work on the Internet if all the file to folder relationships are the same. That is the rule and there are exceptions to every rule. However if you mind your case and name standards, all will work.

Above is an example of a mirrored website. This program allows you to manage your files between your computer and your website. Go to the Publish It lesson to learn more about this program. You can see here the cwalker1 directory, for my personal website and on my commputer, each have the same directories. If you scrolled down or opened any directories, you would see they had the same files there as well. The truth is you would find a couple additional files or directories on the home computer because I am always trying to put together new stuff to send to the website. The files and folders on the website have exact duplicates on my home computer.

For files, you need to be consistent in your case management. I always use lower case extensions and I'm trying to teach myself to use lowercase filenames consistently. If you set a standard for yoursel and stick to it, you will make fewer mistakes when you call that file from one of your web pages. In other words, if you name one graphic file TaylorBike.JPG, then one file taylorbmx.jpg, are you going to remember each file you capitalized and which ones you did not? It makes it tougher and it is critical to use exact case when calling a file.

This image tag, <IMG SRC="taylorbike.jpg">, would not get the TaylorBike.JPG image to appear on your page. Proper case of file, folder, and extension is critical. Even if it did work on your computer, it wouldn't work on most of the other computers in the world.

If you are consistent you never have to guess, "How did I write that one?"

When I put images in my web page, I never use the originals. I always copy the images into that page's folder on my computer. Then I can change them all I want without fear of destrroying the originals. One of the things you can do for a page like the Fun Page on this tutorial, is rename all the pictures in the funpage directory with sequential numbering. In the fun page directory the file are named funpage_01.jpg, funpage_02.jpg, funpage_03.jpg, etc. When I am writing the page code I never have to refresh my memory for the next file name. I know it is the next in order. I use Thumbs Plus, a graphics program available as shareware, to auto rename files in a directory. Make it easy for yourself.

See the Graphics Guide for more on images.

There are a couple real benefits to this style of file management. If you have a page that you want to update regularly like the Fun Page, all you need to do is put new pictures in your local computer funpage directory. Then rename them all just like the previous set, funpage_01.jpg, funpage_02.jpg, funpage_03.jpg, etc. Now when you upload the new pictures, you don't have to change the picture codes in the funpage.htm file. You would have to update the text though. It wouldn't do to have legoland text with beach bikini pictures. Make it easy on yourself.

Do not use spaces in you file and folder names. It might work on your computer but it will not work out there. Use_the_Under_score_to_add_spaces_to_your_folder_and_file_names. It will be trated as one word by your browser.

by Craig Walker


HTML written in Notepad
Best Viewed @ 800 x 600
WebMaster: Craig Walker
cwalker1@cox.net