I'm not totally sure what you're asking, but, generally,
ftp is a
file transfer protocol and won't conveniently transfer recursively; i.e., it won't "walk a tree."
If you want to send a tree -- files, directories and the like -- with
ftp, it's easiest to use the
tar utility to create an archive file (and, possibly, use the
gzip utility to compress the
tar file to cut down transfer time); something like this
Code:
tar -cvf dirname.tar dirname
[optional: gzip dirname.tar]
ftp -i server
cd parent_directory_name_on_remote
put dirname.tar [or put dirname.tar.gz]
At the other end, dirname.tar.gz is unzipped and extracted (with
tar) and the directory tree is then available.
If you're simply copying a bunch of files, that might be done
Code:
ftp -i server
cd parent_directory_name_on_remote
mput *.*
The "-i" option to
ftp is important for the
mget and
mput options.
An option worth considering is
scp. If you have
ssh configured between machines, you can simply recursively copy files and directories in one go using
scp.
Hope this helps some.