public static String getUniqueName(DomainFolder folder, String baseName) {
		int tryNum = 0;
		int MAX_TRY_COUNT = 1000;
		while (tryNum < MAX_TRY_COUNT) {
			String tryName = baseName + (tryNum > 0 ? Integer.toString(tryNum) : "");
			if (folder.getFile(tryName) != null || folder.getFolder(tryName) != null) {
				tryNum++;
				continue;
			}
			return tryName;
		}
		return null;
	}
Returns a unique name in a Ghidra {@link DomainFolder}.

@param folder {@link DomainFolder} to check for child name collisions.
@param baseName String base name of the file or folder
@return "baseName" if no collisions, or "baseNameNNN" (where NNN is an incrementing
integer value) when collisions are found, or null if there are more than 1000 collisions.
Ghidra/Framework/Project/src/main/java/ghidra/framework/model/ProjectDataUtils.java