def check_dir_file_valid(name):
    """
        Check out the name is valid for director or file or not

        :param name: the name to check (Str)
        :return: ret (Bool)
    """
    if name.strip() == '':
        return False

    banned_ls = ['\\', '/', ':', '*', '?', '"', '<', '>', '|']

    for ch in banned_ls:
        if name.find(ch) != -1:
            return False

    return True