protected File findFile (String name, File direcrory) {
        File[] files = direcrory.listFiles ();

        // files first
        for (int i = 0; i < files.length; i++) {
            File file = files[i];
            if (file.isDirectory ())
                continue;
            if (file.getName ().equals (name))
                return file;
        }

        // folders
        for (int i = 0; i < files.length; i++) {
            File file = files[i];
            if (!file.isDirectory ())
                continue;

            File result = findFile (name, file);
            if (result != null)
                return result;
        }

        return null;
    }