I have create some code that deletes all the files in a folder, the issue is while this is great, I want to be able to delete all the files in a directory but leave the fold
Why not just do
if (!myFile.isDirectory()) myFile.delete();
instead of
myFile.delete();
?