code: public static void renameFiles(File[] files, String[] fileNames) {
          int length = Integer.min(files.length, fileNames.length);
          for (int i = 0; i < length; i++) {
              String fileName = files[i].getParent() + ValueConsts.SEPARATOR + fileNames[i];
              if (!fileName.contains(".")) {
                  fileName += files[i].getName().substring(files[i].getName().lastIndexOf("."));
              }
              if (files[i].renameTo(new File(fileName))) {
                  logger.info("rename file '" + files[i].getAbsolutePath() + "' to '" + fileName + "'");
              } else {
                  logger.info("rename file '" + files[i].getAbsolutePath() + "' error");
              }
          }
      }
docs: 重命名多个文件
  
  @param files 文件数组
  @param fileNames 文件名，与文件数组一一对应