visit
how to articles
"Let Tthe Computer Do The Work" series
(note: this article is a work in progress and was last updated 26-May-2005 . check back soon for the latest updates.)
Building Content using Folders and the Files In Them
using ASP FileSystem Object (PHP coming soon)
- Description
- Step 1 Gather Files and Folders
- Step 2 Go Find The Files
- Step 3 Link Up To the Files
- Step 4 Enoy The View on your Web Page
- But, Can I Also...
STEP 1 Descriptive Names
1. Define descriptive names for Folders and the Files within them.
Our goal in this step is to logically name Folders and the Files in them
so that the code we'll write
in the next steps can easily find and use them. By creating a naming scheme
for Folders and Files, we make it
possible to Let The Computer Do The Work of find and linking to collections
of files.
One folder will suffice if all the files belong together, but use multiple folders to organize files, i.e., a "photos" folder for your digital camera images, and a "documents" folder for something else. If you only need one Folder to hold your Files, then we can simplify our coding even more.
Our example uses just one Folder named carimages. We only want that carimages Folder to contain the digital photos of the classic cars. So, out first task of creating a Folder is done. The Files within that Folder, as we said, need to be only the classic car images.
We need to have meaningful names for our files, rather than the names they had from our digital camera. So, based on the name of the classic car they picture, we will rename our Files accordingly:
66 Chevelle.jpg
68 Malibu.jpg
70 SSOrange.jpg
71 Mustang Conv.jpg
We are using File names with embedded spaces, to ultimately make more readable text links. To use File names without spaces, consider using underscore to separate words within the File name, i.e. 71_Mustang_Conv.jpg.
We will upload them to our Web site via FTP - your Web Hosting provider will furnish the necessary information and software for you to do that. You can also create any new Folders you need using your FTP software.
For this step, we have accomplished creating a Folder and uploading Files with meaningful names to it. From the example, you see that the File names, except for the ".jpg" file extension, are the same as the text links we will eventually have on our Web page.
and the next step is Step 2...