public static void main (String[] args) throws FileNotFoundException, IOException
    {
        String allString = "";
        File dir1 = new File(onMac);
            //"C:/Documents and Settings/fsimon0/My Documents/Cubisima Final/"
        
        String[] datefolderChildren = dir1.list();
        for (int i=0; i< datefolderChildren.length; i++){
            if(!datefolderChildren[i].equals("03Feb2012 - CB")){
                String date = datefolderChildren[i]; 
                String enclosing = onMac+date;
                    //"C:/Documents and Settings/fsimon0/My Documents/Cubisima Final/"
                File dir = new File(enclosing);
                String[] individualHTMLChildren = dir.list();
                //System.out.println("indivasdasda" + individualHTMLChildren[0]);
                if(individualHTMLChildren!=null){
                    for (int j =0; j<individualHTMLChildren.length; j++){
                        String oneDateFile = "";
                        if (individualHTMLChildren[j].contains("Permutas.csv")){
                            System.out.println(individualHTMLChildren[j]);
                            String fn = onMac+datefolderChildren[i]+"/"+individualHTMLChildren[j]+"/";
                                //"C:/Documents and Settings/fsimon0/My Documents/Cubisima Final/"+datefolderChildren[i]+"/"+individualHTMLChildren[j]+"/";
                            BufferedReader areader = new BufferedReader(new FileReader(fn));
                            String sCurrentLine;
                            while ((sCurrentLine = areader.readLine()) != null) {
                                if(!sCurrentLine.contains("Dummy")){
                                    oneDateFile = oneDateFile+sCurrentLine+"\n";}
                            }
                            allString = allString + oneDateFile;
                            //System.out.println(oneDateFile);
                        }
                        else{continue;}
                    }
                }
            }
        }
        //System.out.println("AllString" + allString);
        File theAllTXTFile = new File (onMac + "/AllPermutas.csv");
            //"C:/Documents and Settings/fsimon0/My Documents/AllPermutas.csv"
        FileWriter allFileWriter = null;
        try {allFileWriter = new FileWriter(theAllTXTFile);} catch (IOException e1) {}
        allFileWriter.write(headers);
        allFileWriter.write(allString);
    }