Share code snippets.

findxlsxfilesinfolder

Created 3 years ago by anonymous
find files in a folder in java
File file = new File(path);
		
		File[] list = file.listFiles(new FilenameFilter() {
			
			@Override
			public boolean accept(File dir, String name) {
				return name.endsWith(".xlsx");
			}
			
		});
		
		if(list == null ||  list.length ==0) {
			logger.error("no .xlsx  file found in folder : " + file);
		}