mo = datepattern.search(filename)
if mo == None:
    continue
beforepart = mo.group(1)