I am writing new files into a directory on daily basis.
BufferedWriter bw = new BufferedWriter(new FileWriter("C:\\difftest\\newfiles\\"+decisionList.get(i)+"_"+i+".txt"));
Before creating new files, I want to delete the previously added files existing in the folder. And the previous files will not override with new ones because the file names are different. How can I achieve this?