1
I’m making a Java application that takes information from multiple files *.tif
in a directory, but I can’t take information from more than one at a time and need to put the specific path of each file. I’m using Paths
for that. If anyone can help me thank you.
Path path = Paths.get("C:\\teste2");
BasicFileAttributes attributes = Files.readAttributes(path, BasicFileAttributes.class);
FileTime creationTime = attributes.lastModifiedTime();
long tempo;
tempo = creationTime.toMillis();
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
System.out.println(sdf.format(tempo));
I gave this part, but I could not compare the names of the files of two different directories. You have some idea. I did the comparison like this: if (filePath.getFileName(). equals(f. getName()))
– R.Santos
Young man, this is not part of the initial doubt. If "this part" has worked, keep the question as it is and open a new one with your other doubt.
– Jéf Bueno