import shutil


def copy_file(src, dest):
    """
    copy file from one directory to another

    :param src: path of the source file
    :param dest: path of the destination
    :return:
    """
    # copy to directory
    try:
        shutil.copy(src, dest)

    # source and destination are same
    except shutil.SameFileError:
        print("source\t{} and destination\t{} represents the same file.".format(src, dest))

    # permission error
    except PermissionError:
        print("Permission denied!")

    # any other errors
    except Exception as error:
        print(error)
    return dest