String directory = "C:\Users\Administrator\AppData\Local\Temp\8ad088a2-0bb3-41dc-89d9-2c57ef8414b0"; List<File> files = Files.list(Paths.get(directory)).map(path -> path.toFile()).collect(Collectors.toList());