def write_dst2cmd(cmd_file: str, dst_file: str, zs: float):
    """
    write_dst2cmd(cmd_file, dst_file, zs)

    This function writes the path to the dst_file to and the source depth
    to the cmd file.

    Parameters
    ----------
    cmd_file: str
        Path to cmd file
    dst_file: str
        Path to dst file
    zs: float
        cartesian source depth in km

    Returns
    -------
    Writes dst_file

    """
    file = open(cmd_file, 'r')
    lines = file.read().splitlines()
    lines[20
        ] = '   {:.4f}                                  Depth of source'.format(
        zs)
    lines[21] = (
        '"{}"                                    Range and azimuth file'.
        format(dst_file))
    file.close()
    file = open(cmd_file, 'w')
    file.write('\n'.join(lines))
    file.close()
