Force Delete all files from a folder
I have been using a Specific Piece of code to delete files from a folder but it is Proving very Problematic because Maybe I forgot to close an InputStream or two,. The code I have is so big that I amy not be able to sight all the Inputstreams that I have Not closed. Is there a way of deleting files whether there is an Open InpuStream or not????????

This is the piece of the code that I have been Using;

    File fin = new File("C:/ABC Statements final/");
        File[] finlist = fin.listFiles();       
        for (int n = 0; n < finlist.length; n++) {
            if (finlist[n].isFile()) {
                finlist[n].delete();
            }
        }        


I need a better way to get rid of these files regardless of whether there are Open InputStreams anywhere. Is there a way I can force the files to get deleted?
Force Delete all files from a folder
===

I have been using a Specific Piece of code to delete files from a folder but it is Proving very Problematic because Maybe I forgot to close an InputStream or two,. The code I have is so big that I amy not be able to sight all the Inputstreams that I have Not closed. Is there a way of deleting files whether there is an Open InpuStream or not????????

This is the piece of the code that I have been Using;

    File fin = new File("C:/ABC Statements final/");
        File[] finlist = fin.listFiles();       
        for (int n = 0; n < finlist.length; n++) {
            if (finlist[n].isFile()) {
                finlist[n].delete();
            }
        }        


I need a better way to get rid of these files regardless of whether there are Open InputStreams anywhere. Is there a way I can force the files to get deleted?