Use mput to transfer a directory using ftp?

Is there anyway to convince mput to send all sub directories of the current directory to the server. I'm trying to write a script to automatically update a website when it is run. So far ive been trying

 mput *   

but that only sends the files in the current directory.

Any help would be appreciated.


Got it. The windows ftp client does not support a recursive put function. However, using ncftp: http://www.ncftp.com/ im able to do a recursive put with mput -r *


A simple tutorial for other Windows newbies like me who wind up here:

The easiest way to upload an entire folder (with all subfolders and files in them) is:

  1. Download NcFTP Client (it's free, but you can donate) from this link.
  2. Choose NcFTP Client 3.2.5 for Microsoft Windows from the list.
  3. Install it.
  4. When done, a small CMD window with a cherries icon will pop-up. You don't need it.
  5. Just open a standard CMD window and type:
    ncftpput -u *yourUserNameHere* -p *yourUserPasswordHere* -R *www.yourWebsite.com* /
                     _C:\yourFolderDirectoryHere\\*_
    (as one line).

Note that:

  • -R is a flag for "recursive"; it makes the command copy all subfolders recursively
  • / (slash) is your website's root directory
  • C:\yourFolderDirectoryHere\* selects everything inside C:\yourFolderDirectoryHere