Why does FileZilla descend into a directory when deleting?

6

Why does FileZilla itterrate through each file in a folder and delete each one instead of just deleting the folder? I know this sounds like a simple question, and it probably has the simple answer that FTP doesn't delete folders, but I was just wondering if anyone could shed some light on this issue.

Arlen Beiler

Posted 2011-06-23T12:20:42.873

Reputation: 1 108

Answers

9

You've answered your own question - there's no concept in ftp of 'removing a directory and everything below it' with one command. Most FTP clients therefore iterate through every file one at a time, and then remove the parent directory.

EightBitTony

Posted 2011-06-23T12:20:42.873

Reputation: 3 741

So what happens if you try to remove a directory with stuff in it? An error? – Arlen Beiler – 2011-06-23T12:56:11.220

Yes, depending on the FTP client you use, you'll get an error, or it'll iterate through everything and remove the files. Command line client error example -> ftp> rmdir todo / 550 todo: Do not specify an existing file. – EightBitTony – 2011-06-23T12:58:41.963