How many levels deep is your directory structure?
For example, say previously your files were inside a root directory, and now they're inside root/domain1, root/domain2, root/domain3, etc.
For that, I wrote something rather simple.
String rootPath = <path_to_root>;
File[] domains = new File(rootPath).listFiles();
for (File domain : domains) {
if (domain.isDirectory()) {
File[] files = new File(domain.getAbsolutePath()).listFiles();
for (File file : files) {
if (file.isFile() && file.getAbsolutePath().endsWith(".mkv")) {
System.out.println(file.getAbsolutePath());
}
}
}
}