Posted By:
Christopher_Koenigsberg
Posted On:
Monday, March 24, 2003 09:44 AM
For copying files from a subdirectory, in ftp, usually for most ftp servers, unless I'm missing some recent developments in the protocol, you have to go in and copy each one, one at a time. There's no "copy recursively, directory and all files + subdirectories" command, in the ftp protocol, unfortunately.
So, typically you have to manually make all the directories and subdirectories first, to match what's on the server. And then you just fetch the files, since the matching directories already exist locally.
Some ftp servers (the "wuftpd" was the classic, free reference, but perennially buggy & insecure, implementation) do provide extensions to the basic ftp protocol, that will let you do something else. Some will even let you fetch a tarball, which they make on the fly, for instance. e.g. If you find that there is a directory on the server named "foo", some ftp servers will honor a request for "foo.tar.gz" and will generate it on the fly for you, tarring and gzipping the contents, recursively, of the foo directory.
Then once you fetch the tarball, of course you have to manually gunzip and untar it yourself, locally.