|
HTML Tutorial on File Structure
DOS File Structure (Windows)
Contrary to some beliefs, DOS is still alive and well living in the
Windows environment. The purpose of this section is to help you make
a local environment for building your webpage.
When you see a web site being constructed, it usually goes from nothing
to complete in minutes. It is doubtful that anyone can program that
fast. It makes more sense to build it and test it on your local machine
before you expose it to the world.
|
|
A directory (or folder) is a location for files. It is a more organized
way of storing files and keeping things separated on your hard disk.
|
|
DOS Method
To make a directory in DOS, type
the following at the DOS Prompt (C:\>):
C:\>MD\dirname
Where: dirname is the name of the
directory you are making. For your webpage, you might want to
call it WEBPAGE. The syntax for this command would be:
C:\>MD\WEBPAGE
Note: If you are planning on making several web sites, you may
want to make a sub-directories like WEBPAGE\FIRST and
WEBPAGE\SECOND. The syntax for these commands would be:
C:\>MD\WEBPAGE\FIRST
C:\>MD\WEBPAGE\SECOND
|
|
Windows Method
This procedure will describe using Windows Explorer in Windows
98/ME/2K/NT/XP/Vista/W?. Click 'Start', 'Programs', 'Windows Explorer'
(some windows versions put it under accessories).
The Windows environment prefers to call a directory a folder,
so, this procedure will follow that convention.
Make sure the (C:\) folder is highlighted like the figure
below. If you are making a sub-folder of another folder, make
sure you are highlighting that folder.

Then, select 'File', 'New' and 'Folder'. The Windows Explorer
will create a new folder and prompt you to name it.
|
|
Unix File Structure (Web)
Unix runs on the best web servers and have for years. It is more stable
and considerably more efficient than anything else. Because of this,
Unix has established certain standards and procedures. Since most of
you probably will never run your own Unix server, I won't go into
too many details and glaze your brains. ;-)
If you are thinking "I can make my own web page", then some details
about Unix can make your life easier. More specifically, how a web
server works. Unix does do some things a little differently and you
should know some of these details.
|
|
DOS/Windows
|
Unix/Web Servers
|
- DOS
- 11 character filename system.
- Windows
- 32 character filename system.
|
- Unix
- 32 character filename system.
|
|
Not always case sensitive.
FILENAME = Filename
FILENAME = filename
You could have all three filenames, but each would be called by
its' correct name using the proper case.
|
Case sensitive.
FILENAME (not =) Filename
FILENAME (not =) filename
You could have all three filenames, but the wrong case on any
character would not bring up the name anyway.
|
|
A file name can include spaces
"This is a file name.htm"
would appear as:
This is a file name.htm
Recommend:
Thisisafilename.htm or
This_is_a_file_name.htm or
This-is-a-file-name.htm
|
A file name does not include spaces
"This is a file name.htm"
would appear as:
This%20is%20a%20file%20name.htm
%20 is the hexadecimal value of a space ( ) which is decimal 32.
|
|
Directory\Filename
Notice the slash between the Directory and Filename? It is a
back slash (\).
|
Directory/Filename
Notice the slash between the Directory and Filename? It is a
forward slash (/). Minor, but significant difference.
Web pages should always reference the Unix style, even when
testing on your local machine (the browser knows).
|
|
directory/index.html
When calling a page with your browser, always include the file
name. Index.htm or index.html is usually the starting file in
a web page.
|
directory/
In Unix, your browser can just point to the domain and the
server will give you index.html (or index.htm). You only need
to specify a file name if you are trying to find a different
name.
Occasionally, you may find a server that does something else,
but that is setup by experts for their own purposes.
|
|
|