def do_rename_file(cnamer, new_name):
    # type: (Renamer, str) -> None
    """Renames the file. cnamer should be Renamer instance,
    new_name should be string containing new filename.
    """
    try:
        cnamer.new_path(
            new_fullpath=new_name,
            force=Config["overwrite_destination_on_rename"],
            leave_symlink=Config["leave_symlink"],
        )
    except OSError as e:
        if Config["skip_behaviour"] == "exit":
            warn("Exiting due to error: %s" % e)
            raise SkipBehaviourAbort()
        warn("Skipping file due to error: %s" % e)
Renames the file. cnamer should be Renamer instance,
    new_name should be string containing new filename.
    
tvnamer/main.py