With command line FTP, how can I transfer a group of files without typing out all their names?

The FTP get and put commands only transfer single files. To transfer multiple files, you can use the commands mget and mput.

Transferring files from your computer to another

  1. To transfer files to another computer, open an FTP connection to that computer.
  2. To move files from the current directory of your computer, use the mput command.

    For example, to move files named myfile, mynotes, and mystuff from the current directory of your computer, at the FTP prompt, enter:

     mput my*

    The asterisk (*) is a wildcard that tells FTP to match all files starting with my. You can also use a question mark (?) to match a single letter. To interrupt the series of transfers, press Ctrl-c, and FTP will ask you whether you want to continue.

  3. When prompted, enter y to transfer each file. To turn this feature off, before you begin transferring files, at the FTP prompt, enter:
     prompt

Transferring files from a different computer to yours

  1. Open an FTP connection to another computer.
  2. To retrieve files, use the mget command.

    For example, to retrieve files named myfile1, myfile2, and myfile3 from another computer, at the FTP prompt, enter:

     mget myfile?
  3. If prompted, enter y to transfer each file.
Note:

If the files you're transferring are anything other than plain ASCII text files, specify a binary transfer before sending or receiving. To do so, at the FTP prompt, enter:

binary

At Indiana University, for personal or departmental Linux or Unix systems support, see At IU, how do I get support for Linux or Unix?

This is document aceu in the Knowledge Base.
Last modified on 2017-05-16 11:50:00.

  • Fill out this form to submit your issue to the UITS Support Center.
  • Please note that you must be affiliated with Indiana University to receive support.
  • All fields are required.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.

  • Fill out this form to submit your comment to the IU Knowledge Base.
  • If you are affiliated with Indiana University and need help with a computing problem, please use the I need help with a computing problem section above, or contact your campus Support Center.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.