PDA

View Full Version : mget & mput recursive


DoulaMama
06-14-2002, 08:06 AM
What is the command syntax to FTP multiple files inluding subdirectories? Thanks for your time!
~ Alissa

Kevin
06-14-2002, 10:32 AM
DoulaMama,
Unfortunately the standard unix ftp client doesn't really support recursive transfers (at least not very well). The best way to do it from the command line is to use ncftp which is on our servers. With ncftp you can use 'mget -r [file list]' or mput the same way.

Also, since you are probably not doing anonymous ftp which is the default in ncftp you should launch it with 'ncftp -u [username] [hostname]'. It will prompt you for the password and when you log out of the session it will ask you if you want add a bookmark which will give you a nice shortcut.

DoulaMama
06-15-2002, 12:15 PM
Hmmm... I got NcFTP and got logged in, but am not able to get the command to work. I'm sure I'm screwing up something simple in the syntax. I've looked through the help and am still confused. To get all the contents of DIRECTORY/ and all of it's subdirectories from the server at FutureQuest to my home PC, I am typing
mget -R DIRECTORY
mget -R DIRECTORY/*
mget -R * from within the directory
Also tried the same commands using get since the NcFTP seemed to say that get works like FTP's mget. Still not getting any subdirectories. Help!

Kevin
06-17-2002, 11:54 AM
DoulaMama,
It seems you found an incompatibility between ncftp and twoftpd. It will not work with ncftp and that is the only command line ftp client that I know of that even supports recursive transfers :(

However, many of the Windows GUI ftp clients do work fine. WS_FTP (http://www.wsftp.com/Products/file-transfer.html) and FTPExplorer (http://www.aota.net/FTP/hsFTPexp.php3) are both known to work.

Another good choice is to dump FTP completely and use rsync (http://rsync.samba.org/) for the transfer. It is designed to handle large directory trees and it even compares files so it only has to transfer the ones that have been modified since the last rsync. :)

-Kevin

DoulaMama
06-17-2002, 11:58 AM
Well at least I haven't totally lost it then. %)
Thank you for the other suggestions. I will try them out.