It appears that you're deleting folders and contents via File Transfer Protocol (FTP). We're not quite sure if that is possible with FTP clients as the only way you can delete folders and contents in one go is by running commands.
If you're using an FTP client and it does not have a feature of deleting folder and contents, then that means that you will have to delete the contents first before you can delete the directory.
Let us know if you need further info. Cheers!