docs: protected boolean performDialogOperation() throws CmsException {
  
          // display "please wait" screen before renaming the images
          if (!DIALOG_WAIT.equals(getParamAction())) {
              // return false, this will trigger the "please wait" screen
              return false;
          }
  
          // lock the image gallery folder
          checkLock(getParamResource());
  
          // get all image resources of the folder
          int imageId = OpenCms.getResourceManager().getResourceType(
              CmsResourceTypeImage.getStaticTypeName()).getTypeId();
          CmsResourceFilter filter = CmsResourceFilter.IGNORE_EXPIRATION.addRequireType(imageId);
          List<CmsResource> images = getCms().readResources(getParamResource(), filter, false);
  
          // determine start count
          int count = 1;
          try {
              count = Integer.parseInt(getParamStartcount());
          } catch (Exception e) {
              // ignore this exception
          }
  
          // create number printer instance
          PrintfFormat numberFormat = new PrintfFormat("%0." + getParamPlaces() + "d");
  
          // create image galler folder name
          String folder = getParamResource();
          if (!folder.endsWith("/")) {
              folder += "/";
          }
  
          Iterator<CmsResource> i = images.iterator();
          // loop over all image resource to change
          while (i.hasNext()) {
              CmsResource res = i.next();
              String oldName = CmsResource.getName(res.getRootPath());
              CmsProperty titleProperty = getCms().readPropertyObject(res, CmsPropertyDefinition.PROPERTY_TITLE, false);
              String oldTitle = titleProperty.getValue();
  
              // store image name suffix
              int lastDot = oldName.lastIndexOf('.');
              String suffix = "";
              String oldNameWithoutSuffix = oldName;
              if (lastDot > -1) {
                  suffix = oldName.substring(lastDot);
                  oldNameWithoutSuffix = oldName.substring(0, lastDot);
              }
  
              // determine new image name
              String newName = "";
              if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(getParamPrefix()) && !"null".equals(getParamPrefix())) {
                  newName += getParamPrefix();
              }
              // create image number
              String imageNumber = numberFormat.sprintf(count);
              newName += imageNumber + suffix;
  
              if (!newName.equals(oldName)) {
                  // only rename resources which have a new resource name
                  if (getCms().existsResource(folder + newName, CmsResourceFilter.ALL)) {
                      // target resource exists, interrupt & show error
                      throw new CmsException(
                          Messages.get().container(
                              Messages.ERR_MOVE_FAILED_TARGET_EXISTS_2,
                              getCms().getSitePath(res),
                              folder + newName));
                  }
  
                  // determine the new title property value
                  if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(oldTitle)) {
                      if (oldTitle.equals(oldNameWithoutSuffix)) {
                          if (Boolean.valueOf(getParamRemovetitle()).booleanValue()) {
                              // remove the title property value
                              if (oldTitle.equals(titleProperty.getStructureValue())) {
                                  titleProperty.setStructureValue(CmsProperty.DELETE_VALUE);
                              }
                              if (oldTitle.equals(titleProperty.getResourceValue())) {
                                  titleProperty.setResourceValue(CmsProperty.DELETE_VALUE);
                              }
                          } else {
                              // set the title property to the new resource name
                              if (oldTitle.equals(titleProperty.getStructureValue())) {
                                  titleProperty.setStructureValue(getParamPrefix() + imageNumber);
                              } else if (oldTitle.equals(titleProperty.getResourceValue())) {
                                  titleProperty.setResourceValue(getParamPrefix() + imageNumber);
                              }
                          }
                          // write changed title property
                          getCms().writePropertyObject(getCms().getSitePath(res), titleProperty);
                      }
                  }
  
                  // now rename the resource
                  getCms().renameResource(folder + oldName, folder + newName);
              }
  
              // increase image counter
              count++;
          }
  
          return true;
      }