it's worked fine for me, i hope it will work for you.
File dir = new File(Environment.getExternalStorageDirectory()+"DirName");
if (dir.isDirectory()) {
String[] children = dir.list();
for (int i = 0; i < children.length; i++) {
new File(dir, children[i]).delete();
}
}