def appendformat(filepath, form):
    """
    Append a format string to the end of a file path.

    **Parameters**\n
    filepath: str
        File path of interest.
    form: str
        File format of interest.
    """

    format_string = '.'+form
    if filepath:
        if not filepath.endswith(format_string):
            filepath += format_string

    return filepath