Vote count:
0
I have a block of code:
List<String> unusedFolders = new ArrayList<String>();
for (int i = 0; i < unusedFolders.size(); i++) {
File dirDate = new File(unusedFolders.get(i));
String[] files = dirDate.list();
for(String f: files) {
File file = new File(dirDate.getPath(),f);
file.delete();
}
dirDate.delete();
//dirDate.deleteOnExit();
}
The list "unusedFolder" has values like:
C:\opt\transmission\tejas\transform\inv\20140927
C:\opt\transmission\tejas\transform\inv\20140928
C:\opt\transmission\tejas\transform\inv\20140929
It ran with no errors in eclipse but when I check in the windows explorer, the folders are still there and when I try to access it (click). It prompts:
C:\opt\transmission\tejas\transform\inv\20140927 is not accessible. Access is Denied.
Now, I can't even delete it manually. Anyone has an idea? thank you.
asked 1 min ago
Java delete folder stil exists
Aucun commentaire:
Enregistrer un commentaire