String a_file_dir = "E:\\test\\a\\";
File spk=new File(a_file_dir + "test1.txt");
File spk_bak=new File(a_file_dir+"test1.doc");
System.out.println(spk.renameTo(spk_bak));
重命名文件
String a_file_dir = "E:\\test\\a\\";
File spk=new File(a_file_dir + "test1.txt");
File spk_bak=new File(a_file_dir+"test1.doc");
System.out.println(spk.renameTo(spk_bak));
重命名文件