import re


def process(s):
    """Process the file name as input string s to ensure that it adheres to
    Windows file naming requirements. """
    if len(s) > 240: s = s[0, 240]
    return ''.join(re.split(r"[\\\:\*\?\"\<\>\|]", s.strip()))