code: public String increment() {
          // filename[count].jpg
          int count = 0;
          String newFilename,
                 altered = filename();
          if (altered.charAt(altered.length()-1) == RIGHT) { //(last char == 'v') we assume that a suffix already has been applied
              
              int rightBracket = altered.length()-1, 
                  leftBracket  = altered.lastIndexOf(LEFT);
  //              leftBracket  = rightBracket-2;// '-2' because at least one char ought to be between LEFT & RIGHT
                  // crawling backwards
  //              while (leftBracket > 0 && altered.charAt(leftBracket) != LEFT) leftBracket--;
              
              try {
                  count = Integer.parseInt(altered.substring(leftBracket+1, rightBracket));
              } catch (NumberFormatException | IndexOutOfBoundsException ignore) {
                  //if it fails, we can assume that it was not a correct suffix, so we add one now
                  newFilename = altered + LEFT;
              }
              
              newFilename = altered.substring(0, leftBracket+1);
          } else {
              newFilename = altered + LEFT;
          }
          newFilename += (count+1);
          newFilename += RIGHT; // to prevent the char being added as an int
              
          updateName(newFilename);
          return newFilename + EXTENSION_SEPERATOR + ext;
      }
docs: filename.jpg -&gt; filename_1v.jpg -&gt; filename_2v.jpg
  
  I wanted to use filename[1].jpg, but ResourceHandler seems to not understand that format
  
  @return The new filename