private void processFile(File dir) {
        String filepath = dir.getPath();
        filepath = filepath.substring(root.length(), filepath.length());
        filepath = filepath.substring(0, filepath.lastIndexOf(File.separator));
        if (filepath != null && !filepath.equals("")) {
            filepath = File.separator + filepath + File.separator;
        } else {
            filepath = "";
        }
        final String filename = dir.getName();
//            filename = filename.toLowerCase();
//            filename = filename.replaceAll("[~, ]", "_");
        try {
            BufferedInputStream input = null;
            BufferedOutputStream output = null;
            try {
                input = new BufferedInputStream(new FileInputStream(dir));
                filepath = root + TARGET_DIR + filepath;
                final File out = new File(filepath);
                if (!out.exists()) {
                    out.mkdirs();
                }
                output = new BufferedOutputStream(new FileOutputStream(filepath + filename));
                byte[] data = new byte[8192];
                int seg = 0;
                while ((seg = input.read(data)) != -1) {
                    output.write(data, 0, seg);
                }
            } finally {
                if (input != null) {
                    input.close();
                }
                if (output != null) {
                    output.close();
                }
            }
        } catch (FileNotFoundException e) {
            //
        } catch (IOException e) {
            //
        } catch (Exception e) {
            
        }
    }