I want to create and delete a directory using Java, but it isn\'t working.
File index = new File(\"/home/Work/Indexer1\"); if (!index.exists()) { index.m
you can try as follows
File dir = new File("path"); if (dir.isDirectory()) { dir.delete(); }
If there are sub folders inside your folder you may need to recursively delete them.