def GetLatestArchive():
    """Return the most recent JuniperAccessLog file for today's date."""
import glob
from datetime import datetime
archive_format = datetime.now().strftime(
    'JuniperAccessLog-standalone-FCL_VPN-%Y%m%d-%H*.gz')
archives = glob.glob(archive_format)
if len(archives) > 0:
    return archives[-1]
else:
    return None
How to get the most recent file