public static String batchRenameKeepSuffix(File dir, DefaultListModel model, String pattern) {
        int alphabetCounter = 0;
        String newname = "";
        String name = "";
        String suffix = "";
        StringBuffer sb = new StringBuffer();
        if (!dir.exists()) {
            dir.mkdirs();
        }
        sb.append("BATCH RENAME INFO");
        sb.append(System.getProperty("line.separator"));
        int errors = 0;
        for (int i = 0; i < model.size(); i++) {
            File old = new File((String) model.get(i));

            if (alphabetCounter > alphabet.length) {
                sb.append((i + 1) + ") ==ERROR== File " + old.getAbsolutePath() + " was not renamed because number of files (" + model.size() + ") is greater than number of letters ( " + ALPHABET.length + "}");
                errors++;
                sb.append(System.getProperty("line.separator"));
            } else {
                try {
                    name = old.getName();
                    suffix = name.substring(name.lastIndexOf("."));
                    name  =  name.substring(0, name.lastIndexOf("."));

                    newname = pattern.replaceAll("&N", name);
                    if (pattern.contains(">") || pattern.contains("<")) {
                        newname = newname.replaceAll("<", alphabet[alphabetCounter]);
                        newname = newname.replaceAll(">", ALPHABET[alphabetCounter]);
                        alphabetCounter++;
                    }

                    newname = newname.replaceAll("#", i + "");
                    File newFile = new File(dir+System.getProperty("file.separator")+newname+suffix);
                    if (newFile.exists()) {
                        throw new Exception("Target file already exists ");
                    } else {
                        newFile.createNewFile();
                    }

                    FileChannel source = null;
                    FileChannel destination = null;
                    try {
                        source = new FileInputStream(old).getChannel();
                        destination = new FileOutputStream(newFile).getChannel();
                        destination.transferFrom(source, 0, source.size());
                    } finally {
                        if (source != null) {
                            source.close();
                        }
                        if (destination != null) {
                            destination.close();
                        }
                        sb.append((i + 1) + ") File " + old.getAbsolutePath() + " was renamed to " + newFile.getAbsolutePath());
                        sb.append(System.getProperty("line.separator"));
                    }
                } catch (Exception a) {
                    sb.append((i + 1) + ") ==ERROR== File " + old.getAbsolutePath() + " was not renamed because: " + a.getMessage() + " >> " + a.toString());
                    errors++;
                    sb.append(System.getProperty("line.separator"));
                }
            }
        }
        sb.append(System.getProperty("line.separator"));
        sb.append("SUMMARY ");
        sb.append(System.getProperty("line.separator"));
        sb.append("Files renamed: " + (model.size() - errors));
        sb.append(System.getProperty("line.separator"));
        sb.append("Files NOT renamed: " + errors);
        return sb.toString();
    }