are you using linux and when you try to delete a directory and then you get a message that you cannot delete the dir because its not empty. if you get this error is because the directory has some files in it. so to use the rm (remove directory) in your linux shell and delte all the files inside the directories its ok, you can do it just send this command

lets say i want to delete this directory and its files inside: /var/html/old_files/

so i would send this command:
rm -rf /var/html/old_files/


thats it