private static List<String> getAllFiles(File folder, boolean validate){
		List<String> files=new ArrayList<String>();
		if(folder.isDirectory()){
		File[] children=folder.listFiles();
		if(children!=null){
			for(File child:children){
				if(child.isDirectory()){
					files.addAll(getAllFiles(child,validate));
				}else if(child.isFile()){
					boolean valid=true;
					if(validate){
						valid=isValidExtension(child);
					}
					if(valid){
						files.add(child.getAbsolutePath());
					}
				}
			}
		}
		}else{
			boolean valid=true;
			if(validate){
				valid=isValidExtension(folder);
			}
			if(valid){
				files.add(folder.getAbsolutePath());
			}
		}
		
		return files;
	}