When you want to completely delete a directory and it has file with long names inside it, robocopy does a VERY good job:
mkdir empty_dir robocopy c:\empty_dir c:\the_dir_to_delete /s /mir rmdir empty_dir rmdir the_dir_to_delete
ref: http://superuser.com/questions/45697/how-to-delete-a-file-in-windows-with-a-too-long-filename