/*** 将一个文件移动到另一个文件夹
* @param oldPath
* @param newPath
*/
public static void move(String oldPath,String newPath){
File oldFile = new File(oldPath);//用旧的路径实例化一个file对象
File fnewpath = new File(newPath);
if (!fnewpath.exists())
fnewpath.mkdirs();
File fnew = new File(newPath + "/" +oldFile.getName());
if(fnew.exists()) return;
if(!oldFile.getName().endsWith(".bap")){
oldFile.renameTo(fnew);
}
}