import re


def remove_bad_characters(filename):
    """
    Removes erroneous characters from filenames. This includes the `/` character as this is assuming that the filename is being passed, not a path that may include that symbol as part of a directory.

    Parameters
    ----------
    filename : str
      A possible filename

    Returns
    -------
    str
        The filename without any erroneous characters
    """
    return re.sub(r"[<>:?\"/\\|*]", "", filename)