文件的格式转化其实只是一种障眼法,本质上一些文件的属性根本没有发生变化
- 使用转换器转换文件格式,就相当于男性做了变性手术,在本质上性别发生变化
- 手动(自动)更改后缀,就相当于男性画了一个女妆,在本质上性别并未改变,不过给大众一种女性化视觉罢了
下面的代码只是我个人偷懒,批量更改后缀,因为使用电脑解析都可以解析成功(对于我自己的需求而言)
/**
* @description:
* @author: pwby
* @create: 2019-12-06 10:15
**/
public class convert {
public static void main(String[] args) {
File file=new File(File.separator+"G:"+File.separator+"hh");
File[] files=file.listFiles();
for(File f:files) {
String name = f.getName();
f.renameTo(new File(File.separator+"G:"+File.separator+"hh"+File.separator+name.substring(0, name.length() - 4) + "mobi"));
}
System.out.println("完成");
}
}