else
path = getFormFileFolderPath(formType, formInode);
Folder folder = APILocator.getFolderAPI().createFolders(path, currentHost, APILocator.getUserAPI().getSystemUser(), false);
String baseFilename = fileName;
int c = 1;
while(fileAPI.fileNameExists(folder, fileName)) {
fileName = UtilMethods.getFileName(baseFilename) + "-" + c + "." + UtilMethods.getFileExtension(baseFilename);
c++;
}
Host host = APILocator.getHostAPI().find(folder.getHostId(), APILocator.getUserAPI().getSystemUser(), false);
while(APILocator.getFileAssetAPI().fileNameExists(host,folder, fileName, "")) {