2023年7月19日17:12:22
parent
58162c6928
commit
886c08ae1a
|
|
@ -1,6 +1,7 @@
|
|||
package com.zhangmeng.tools.controller;
|
||||
|
||||
import com.zhangmeng.tools.utils.AlertUtils;
|
||||
import javafx.application.Platform;
|
||||
import javafx.beans.value.ChangeListener;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
import javafx.fxml.FXML;
|
||||
|
|
@ -104,6 +105,8 @@ public class BatchUpdateFileNameController {
|
|||
AtomicInteger fileCount = new AtomicInteger();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append(System.lineSeparator());
|
||||
|
||||
new Thread(()->{
|
||||
try {
|
||||
Files.walkFileTree(path, new SimpleFileVisitor<Path>() {
|
||||
@Override
|
||||
|
|
@ -128,11 +131,17 @@ public class BatchUpdateFileNameController {
|
|||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}).start();
|
||||
|
||||
|
||||
stringBuilder.append("文件夹数:").append(dirCount);
|
||||
stringBuilder.append(System.lineSeparator());
|
||||
stringBuilder.append("文件数:").append(fileCount);
|
||||
stringBuilder.append(System.lineSeparator());
|
||||
|
||||
Platform.runLater(()->{
|
||||
result_show.setText(stringBuilder.toString());
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue