Using Ange-ftp Mode
FTP is a standard way to move files around on the Internet or on any TCP/IP network. There are thousands of “anonymous” FTP servers on the Internet from which you can copy files. You might use archie, as we discussed, to locate a particular file, then FTP to copy it to your local server.
Ange-ftp mode alleviates the need for learning FTP commands. Essentially, you just “find” files on remote systems using C-x C-f, then copy them using Dired commands (described in Chapter 5). Ange-ftp mode is a transparent interface to FTP, and it is included in Emacs.
Copying Files with Ange-ftp Mode
From the user’s point of view, ange-ftp mode is really just an extension of the find-file command, C-x C-f, with a little added syntax. So how does Emacs know that you want to start up ange-ftp when you type C-x C-f? Emacs knows to start ange-ftp mode if the following three conditions are met:
The filename begins with a slash
The slash is followed by username@systemname
There is a colon (:) between the system name and the directory or filenames, if any (for example, /email@example.com:/pub)
For example, typing /firstname.lastname@example.org:/pub opens an FTP connection to rtfm.mit.edu and displays the /pub directory. It is easy to forget the slash at the beginning and even easier to forget the colon between the system name and the path to the file. If Emacs says,
Use M-x make-dir RET RET to create a directory
type C-x C-v (for find-alternate-file) to correct the mistake. Check ...