Getting Files with FTP |
Chapter 17Getting Files with FTPAt this point, you've hit all the "big ones" --World Wide Web, e-mail, Usenet. Now you know what all the fuss has been about. But wait, you can still discover some lesser-known yet powerful tools. Next in line is File Transfer Protocol, or FTP. Using FTP is one of the most popular methods of obtaining software and documents on the Internet. By the end of this lesson, you'll be able to answer the following questions about FTP:
Using the two most popular Web browsers, Netscape and Internet Explorer (discussed in Lesson 14, "Netscape Versus Internet Explorer: Finding the Right Browser"), you can FTP files right from a browser window. For added functionality, however, you can obtain clients designed specifically for FTP (see Appendix B, "Shareware Products for Windows"). FTP in a NutshellFile Transfer Protocol. The phrase may sound intimidating when you first hear it; however, it's really not. As you learned in Lesson 1, "The Internet: What's It Really Like?" a protocol is nothing more than a set of rules. Thus, FTP is nothing more than a set of rules for transferring files. Easy, eh? But perhaps you want to know more about what FTP is like. Hang on--the following section is for you. What Is FTP?Imagine, if you will, a super-library--one with aisles of guides, videos, CDs, power tools, and everything else imaginable. Furthermore, imagine that every time you check out a guide or other resource, another one pops on the shelf to take its place. Now imagine no due dates, no library cards. Just browse and get what you want. But don't stop there. Imagine further that you can contribute to the library yourself, providing materials that you have to offer for others, as well. FTP is pretty much like that. Among the many machines on the Internet are some that are dedicated to being electronic "libraries." Each library allows you to upload or download files of text, graphics, and software tools that you can read, view, and use on your home computer.
FTP is a fast, efficient, and reliable way to transfer information. It was one of the first Internet services developed to enable users to transfer files from one place to another. This service is designed to enable you to connect your local machine to a remote computer on the Internet, browse through the files and programs that are available on the computer, and then retrieve those files to your computer. New Term: Local/Remote: You will see the terms "local" and "remote" a lot in reference to FTP. A local machine is your computer--after all, you can't get any more local than your desktop. A remote machine is simply a server to which you connect via means of a modem or network connection. Where Is FTP?The servers that keep all these files for you are commonly called FTP sites. Each site is its own self-contained electronic library containing information, files, and applications on every topic imaginable. You don't really take files from FTP sites, though; you transfer them from the FTP site to your own computer. An unfathomable amount of information is available on FTP sites--trillions and trillions of bytes worth. Some basic types of information are briefly mentioned here; for more information on what these files are called, refer to the section titled "Names: The File Frontier."
Of course, hundreds of variations of these three basic categories do exist, but I hope that this list gives you an idea of the types of resources to which FTP gives you instant access. Anonymous FTPUnfortunately, as great as much of the information is, it's not always available to everybody. Many FTP sites are set up for a specific purpose or for a particular group of users. This limited purpose succeeds in somewhat restricting the access to some of the resources that are available via FTP. The good news is that lots and lots of sites are available to everybody. These sites are called anonymous FTP sites. They are called "anonymous" because they don't require you to identify yourself in order to gain access to the site. Rather, you're invited in as a "guest" to browse and retrieve files as you want.
Many FTP sites restrict use to certain times of the day and to a particular number of users. The wide range of files on anonymous FTP sites means that something really is available for everyone. From novices to experienced programmers, you can find something for you.
FTP Structure and SyntaxBefore you can download anything from an FTP site, you must first get onto a site and then know how it is structured. When doing so, you need to know three basic pieces of information: the site name, the directory path of the file you want, and the actual name of the file. Time Saver: Often, you may not know the specific location of the file you're looking for. Usually, you can conduct a search on the Internet. You can find an excellent place to search for software on the Internet at http://www.shareware.com/. For more specifics on searching for files on FTP, refer to Lesson 20, " Finding People, Places, and Things on the Net." You already learned about domain names in many previous lessons. FTP site names generally (but not always) begin with ftp. As you also know, the protocol portion of an FTP URL is ftp://. Whether you're using a Web browser or an actual FTP client, you shouldn't have any problem getting on. Just remember, if your client asks for a user ID or login ID and password to get onto a site, just use anonymous as your user ID and your@email.address as your password, as shown in Figure 17.2. With most FTP clients, like WS_FTP, you can enter all relevant information before getting on a site. Like a TreeThe second element you need to know is the directory path of the file you want. Directory paths are much like the branches of a tree with each subdirectory "branching" off from a previous one. If you were to climb a tree, for example, you would start at the trunk, climb on a branch, then move out on a limb, and so on. FTP sites are the same. The "trunk" of the FTP site is called, not coincidentally, the root directory. From this directory, you choose the branch directories (called subdirectories) from the root directory. Figure 17.3 shows a simple directory tree on a hypothetical FTP site. An FTP site's directory path even looks sort of like a tree. First, notice that directories on FTP sites all begin with a slash (/). Each slash represents one level, or branch, on the FTP site. If the file you want is in /pub/inet/web/browsers, for example, you take the /inet branch from the /pub trunk, go to the /web limb, and then jump to the /browsers twig (okay, maybe I'm stretching the analogy a bit). Presumably, the file you want is in that last subdirectory. Navigating these paths is easy once you're used to it. If you're using a Web browser, selecting directories and using the Forward and Back buttons enables you to navigate nicely. If you're using an FTP client, such as WS_FTP, you can still click directory names to move down. To move back up, however, you need to remember to double-click the double-dot (..) at the top of each directory window. The double-dot is another throwback to times before GUI interfaces and is standard syntax for "go up a directory." Names: The File FrontierProbably the most confusing part of FTP is the really strange names that files seem to have. If you don't know what you're doing, they can seem almost indecipherable. You can keep in mind a couple points when dealing with filenames, though. First, know that most files you find on FTP sites are compressed to save space. A compressed file has its original code "compacted" into a smaller file. This means that you have to "decompress" files that you download before you can use them. Second, quite a few compression utilities are available, which also means that you need to know many different filename extensions. Table 17.1 gives a breakdown of the most common file extensions on FTP sites today. Table 17.1. File extensions explained.
Both remote and local files and directories are all visible from one FTP client.
Downloading FilesI've given you all the pieces. Now you're ready to put them together and download that first file to your hard drive. Starting out with something easy, like a decompressed text file, is probably a good idea.
To Do: Downloading Files1. Point your client to mirrors.aol.com (FTP client) or ftp://mirrors.aol.com.2. Take the directory path /pub/music/lyrics/d/dire.straits/. 3. Choose one of the albums listed, and download it to your computer's hard drive. 4. Open a word processing program. 5. Open the file you just saved to your hard drive and view it. Next, download something useful. You may have already glanced at Appendix B and noticed that WinZip is listed as a great utility for decompressing files. Well, why don't you go ahead and download the latest demo version right now? To Do: Downloading the Demo1. Point your FTP client (or Web browser) to ftp.winzip.com.2. Take the directory path /winzip/winzip/. 3. Choose one of two files to download at this point. If you have Windows 95, choose winzip95.exe. If you have Windows 3.1, choose wz16vXX.exe (where XX represents the most current version). 4. Download the appropriate file to your hard drive. 5. Choose File|Run (in Windows 3.1) or Start|Run (Windows 95) to run the file you just downloaded. 6. Choose the WinZip Setup option, and follow the directions to set up WinZip. Time Saver: If you are using a Mac, you might want to go ahead and download StuffIt Expander. Simply go to http://www.aladdinsys.com/consumer/expander2.asp and follow the instructions provided on the page. Browser Versus ClientProbably the biggest choice you face when using FTP is the software you'll use. You have two basic choices: a Web browser or a client designed specifically for FTP. Each solution has its own drawbacks, but you should carefully consider a few factors. UsabilityThe first issue is that of usability. For ease of use, a browser wins hands down. Using either Netscape or Internet Explorer, the process of finding and downloading files is as easy as browsing the Web--everything remains point-and-click. You can use a Web site, such as http://www.shareware.com/, to find the files and then click your way to the file you want to download. Figure 17.5 shows such an example. Browsers offer you Web ease for finding and downloading files. I'm not saying that FTP clients are hard to use--they really aren't. However, figuring out exactly how to use these clients definitely takes longer. Also, your using FTP clients doesn't mean that you can't still use a browser to find files--you can. In fact, many FTP pros regularly use the strengths of both browsers and FTP clients to get files quickly and efficiently. FlexibilityThe second real issue to consider when choosing a browser versus a client is flexibility. How many different tasks a browser or client can perform is also of utmost importance. On this measure, the FTP client wins without question. For the most part, using a browser, you can find, download, and upload files, and that's about it. A client, however, offers an entire world of functionality. Many clients, such as WS_FTP for Windows and Fetch for Macintosh, actually act as miniature file managers as well as FTP clients. You can usually change download directories and filenames, delete files, and download multiple files all from one piece of software, as you can see in Figure 17.6. Often, you can also view and even launch files right from within the FTP client. Do you want to save some time by downloading several files at once? Don't use a Web browser! You will probably find yourself using both a browser and a client to use FTP. For many everyday FTP tasks, a browser works fine. For the times you need a more powerful tool, you may want to take advantage of what an FTP client has to offer. SummaryIn this lesson, you learned about what FTP is and how it works. Now you know that two different types of FTP sites exist, one of which (anonymous FTP sites) you can access to get all types of files, documents, and software. You also learned how FTP sites are organized so that you know how to find, explore, and get what you want. Finally, you learned how to download files using FTP, as well as some of the pros and cons surrounding what type of FTP software to use. WorkshopThe following workshop helps solidify the skills that you learned in this lesson. Q&AQ I know that all this great stuff available via
FTP really isn't free. Is that true? QuizTake the following quiz to see how much you've learned. Questions1. Of the following choices, which one describes a directory path? (a) ftp.site.com(b) /pub/graphics/util docviewer.zip 2. Which of these files would be fastest to download? (a) goodfile.tar.gz (b) goodfile.zip goodfile.txt 3. An anonymous FTP site doesn't require any information from you in order for you to use it. (a) True (b) False Answers1. (b) /pub/graphics/util2. Files with no compression are always fastest. 3. (b) False. You must provide a user ID of anonymous and a password of your e-mail address to log on. ActivityNow you can really apply what you've learned and still have some fun. In this lesson, you downloaded WinZip. Now go out and download a compressed file. First, go to http://www.shareware.com and search for games. Find a compressed game that looks interesting, download it, and then decompress it. Yes, you can play some before moving on to the next lesson.
|