Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 7 down vote accepted

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 *

share|improve this answer

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.