Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

At the moment I'm using FileZilla to FTP to my website. Sometimes, I want to delete a large directory, full of lots of other sub-directories and files. Filezilla seems to go through them all individually, which means it takes an absolute age to delete!

Is there any way of doing it quickly/er??


share|improve this question
"Quickly" and "Deleting lots of files" are two things that don't go together well when using an FTP/SFTP client to delete lots of files on a deep directory structure. Anyone who has to maintain a Magento e-commerce website can testify to this. – Fiasco Labs Jul 20 '15 at 5:50
Use SSH, FTP wasn't designed for this. – William D. Edwards Jul 20 '15 at 6:15
up vote 7 down vote accepted

I believe that FTP doesn't actually have a recursive delete operation. The options I can think of are as follows:

  1. Use the ncftp program. This is another FTP program with additional options. However, I think it just works on the command line and doesn't have a GUI.
  2. If you have SSH access to the server then use that instead of FTP and use the rm -r command.
  3. Write a PHP or other script to do the deletion for you.
share|improve this answer
The -r option is a recursive delete. – iivel Mar 19 '11 at 17:03
ncftp is just another FTP client. It still wouldn't have the ability to delete subdirectories recursively in a single command and would at most do what FileZilla does. – Lèse majesté Feb 6 '12 at 6:49
You might be able to execute a command through FileZilla, depending on your login. – Martijn Jul 20 '15 at 7:32

I previously answered a similar question on SO:


Long story short: You can also remove a directory and all of it's parents with the -p switch [using rmdir]. The -r switch though recursively removes directories given in the arguments path:


share|improve this answer

cheat: use winscp in ftp mode. it will convert the simple request and complete all the necessary tasks. it's not an ftp "command line", but it's still ftp and can be used with the same ftp credentials to accomplish the task easily (and as quickly as ftp can accomplish it)

share|improve this answer
and as quickly as ftp can accomplish it <grin> – Fiasco Labs Jul 20 '15 at 5:53

Your Answer


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