<< Back to tutorials

FTP 101 – Part 7: Difference between put and mput

Published {$created} by Carsten Blum


Uploading files with FTP can be simple – if you know the difference between put and mput.Just like get vs mget, the “m” stands for “multiple” – and that’s the key.

In this short tutorial, we’ll walk through what these commands do, when to use each, and how to avoid common mistakes.


Prefer hands-on over reading tutorials? ftpGrid is built to be intuitive — create a free account and get started instantly.


As always, to follow along with this tutorial you need to create an account with ftpGrid.



put – Upload a single file

Use the put command to upload one specific file from your local machine to the remote FTP server.


Example:

put backup.sql

This uploads backup.sql from your current local directory to the current remote directory on the FTP server.


Want to rename the file during upload? Just pass a second filename:

put backup.sql db-2025.sql

This uploads the file but saves it as db-2025.sql on the server.



mput – Upload multiple files at once

mput stands for “multiple put” and is used to upload many files at once, typically using wildcards like *.txt or *.log.


Example:

mput *.txt

This uploads all .txt files in the current local directory.


By default, you’ll be asked to confirm each file:

mput notes.txt? y  
mput report.txt? y

To skip these prompts, run:

prompt

Now when you run mput *.txt, all matching files will upload without asking.



Combining with lcd, cd, and ls

To control where files go, use these:

  • lcd /local/path – change the local directory

  • cd /remote/path – change the remote directory

  • ls – list files in the current remote directory

Example session:

lcd ~/logs  
cd /uploads  
prompt  
mput *.log

This uploads all .log files from your ~/logs folder into /uploads on the server, with no prompts.



Summary: When to use put vs mput

Task

Command

Upload a single file

put

Upload multiple files

mput

Skip confirmation prompts

prompt


Common mistakes to avoid

  • ❌ Trying put *.txt – won’t work! Only mput supports wildcards.

  • ❌ Forgetting to disable prompts before using mput – you’ll have to confirm every file.

Need to automate it all? Consider scripting with lftp or switching to SFTP. ftpGrid supports both!

Free signup
© 2025 ftpGrid

ftpGrid ApS
Branebjerg 24
DK-5471
Gamby
Denmark

Looking for an all-in-one time tracking, timesheet, and invoicing solution - visit our Devanux sister company Nureti at https://nureti.com.

Preview Devanux’s upcoming project Pictoguide – a visual support tool designed to bring structure and clarity to people with ASD.