FTP and Secure FTP (FTPS, SFTP) - Delete multiple files or directories using the mdelete command

by
Jeremy Canfield |
Updated: September 22 2022
| FTP and Secure FTP (FTPS, SFTP) articles
There are a number of different tools that can be used to connect to an FTP / FTPS / SFTP server.
- Windows or Linux command line prompt
- Scripting tool (e.g. Bash, Perl, PowerShell, Python, et cetera)
- The PSFTP command line tool PSFTP.exe (see Installing PuTTY PSFTP)
Use the pwd (remote present working directory) command to determine your current working directory on the remote FTP system (not on your local PC).
ftp> pwd
Remote directory is /home/john.doe
If you need to change the working directory on the remote FTP system, use the cd (change directory) command.
ftp> cd /tmp
Remote directory is now /tmp
Use the mdelete command to delete multiple files or directories on the remote FTP system.
ftp > mdelete foo.txt bar.txt
Use the exit command to disconnect.
ftp > exit
Did you find this article helpful?
If so, consider buying me a coffee over at