visit
how to articles
"Let The 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...
Mining Content from Files and Folders using ASP/PHP to Access the File System (Folders and Files within your Web Site)
Step-by-Step Instructions to Build Photo galleries, Document Archives and such, automatically, using Folders, Files and the ASP FileSystemObject
Many Web sites, both personal and commercial, know that their Web site is a great place to put bulk files so that their visitors can access them. These might be collections of images or documents. While it's easy to put big folders of files on your Web server, it's not so easy to present the files are there, in any sensible fashion. It can take hours to build individual links to these files, with meaningful text for each one.
This aticle describes a way to make these big collections available quickly and usefully, and to automatically update whenever files are added. Using a combination of File and Folder names, and accessing the Web server file sytem (using ASP or PHP), you can make collection accessible and auto-updating in a few steps. Many Web Hosting providers make either ASP or PHP available in even their basic hosting packages.
And this method is more secure than exposing your Web site by allowing visitor to browse directories (a configuration option). That method allows the visitor to easily download, aka steal, your hard-written content for free.
These are the 4 steps involved, each one explained and demonstrated in this article. All the coding necessary to complete this techniqueis demonstrated.
1. Define descriptive names for Folders and the Files within them.
2. Add code to your Web pages to access the folders and files on the fly.
3. Add code to build links to those files on the fly.
4. Enjoy the view! You Web pages will create up-to-the-minute links to the files as the page loads.
As our example, imagine that you collect digital photos of classic cars and would like to display your collection on your Web site. For our example, we have that Web site hosted with a provider who offers ASP as a server technology. Instead of creating a Web page and adding a link to each image one at a time, we want to Let The Computer Do The Work.
The Web page we have in mind will look something like this:
My Web Site
Classic Cars
68 Chevelle
68 Malibu
70 SS
71 Mustang