public class Test {
public static void main(String[] args) {
String fileName = "upload/20221125/20221125563750.pdf";
String filePath = fileName.replace("/", "\");
String oldName = filePath.substring(filePath.lastIndexOf("\") + 1);
System.out.println(oldName);
}
}