Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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

3 Answers 3

up vote 5 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

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

PHP script from: http://php.net/manual/en/function.rmdir.php

share|improve this answer
This would be valid if the question were about PHP. –  Su' Feb 6 '12 at 1:03

Your Answer


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