public static String pathString(String[] path, String delimiter, String surrounding) { String p = ""; for (int i = 0; i < path.length; i++) { p += surrounding + Script.escapeSpecialCharacters(Script.escapeNewLines(path[i])) + surrounding + delimiter; } return p.substring(0, p.length() - 1); }