Download Text (and other) Files from your Website
Have you ever wanted to know how to let your visitors download a text file from your Web site? If you have Windows, we can give it a try.
You need some kind of a .zip program on your hard drive, like PKZip or WinZip. You also need to be familiar with File Transfer Protocol (FTP) programs or some other way to upload files to your Web site directory. (I'm unfamiliar with how FrontPage extensions work, as well as some other programs, so be patient with me).
- Go to your FTP directory and create a new subdirectory just for zip files. Call it zipfiles.
- Go to your hard drive. Find the .txt article you want to download from your site, but don't open it: stay in the "open" box. Let's say the article is named "Resolution."
- Once you've found the filename, move your mouse over it until it's highlighted, then right click. Among your choices will be "Send to" - and in the drop-down menu it will say something like "Compressed (zipped) Folder." Choose it by left clicking once. This creates an additional document. You now have the text and the zipped file.
- Go to the HTML page that will offer the link. In the area you have chosen, say something like:
<P>Download this plain text article <a href="http://www.yoururl.com/zipfiles/Resolution.zip"> by clicking here</A></P>
Once it's formatted to your satisfaction, save this HTML file to your hard drive.
- Go to your FTP program and upload "Resolution.zip" into the new directory, "zipfiles."
- Go back to your main directory and upload the HTML page with the link.
- Test the new upload in your browsers.
All things being equal, you should have a live link. By the way, if you do not zip the text file, and program the code to say "http://www.yoururl.com/zipfiles/Resolution.txt," the file doesn't download. Instead, it opens up right in your browser. There may be times when this is preferable.
This also works for Microsoft Word (.doc) files and PDF files. The key is for visitors to have equivalent files on their hard drives. Almost all computers have plain text, which is why I used it for the primary example.
You may wonder why I recommend that you use the term "plain text." People are much more apt to download a file that is free from the potential of a virus. Text files cannot have viruses since they're all in ASCII. ASCII is an Acronym for the American Standard Code for Information Interchange. Pronounced ask-ee, it's a code for representing English characters as numbers, with each letter assigned a number from 0 to 127.
Webopedia - http://webopedia.com/TERM/A/ASCII.html
PKZip - http://www.pkware.com
WinZip - http://www.winzip.com