def file_name_increase(file_name, file_location):
    """
    Function to increase a filename by a number 1
    Args:
        file_name: The name of file to check
        file_location: The location of the file, derive from the os module

    Returns: returns a good filename.

    """
    add_one = 1
    file_name_temp = file_name
    while verify_file_exists(file_name_temp, file_location):
        try:
            name, file_extension = file_name.split('.')
            file_name_temp = '%s-%i.%s' % (name, add_one, file_extension)
        except Exception as e:
            LOGGER.critical('Function file_name_increase Error {error} ignoring any errors'.format(error=e))
            name = file_name
            file_name_temp = '%s-%i' % (name, add_one)
        add_one += 1
    file_name = file_name_temp
    return file_name
def file_name_increase ( file_name , file_location ) : add_one = 1 file_name_temp = file_name while verify_file_exists ( file_name_temp , file_location ) : try : name , file_extension = file_name . split ( '.' ) file_name_temp = '%s-%i.%s' % ( name , add_one , file_extension ) except Exception as e : LOGGER . critical ( 'Function file_name_increase Error {error} ignoring any errors' . format ( error = e ) ) name = file_name file_name_temp = '%s-%i' % ( name , add_one ) add_one += 1 file_name = file_name_temp return file_name
Function to increase a filename by a number 1
    Args:
        file_name: The name of file to check
        file_location: The location of the file, derive from the os module

    Returns: returns a good filename.