def execute(my, directory, days):
        '''Removes files in directory older than specified days.'''
        dir = directory

        print("Pruning backup files older than [%s] days" % days)

        import datetime
        today = datetime.datetime.today()
        files = os.listdir(dir)
        for file in files:
            path = "%s/%s" % (dir, file)

            (mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime) = os.stat(path)
            ctime = datetime.datetime.fromtimestamp(ctime)
            if today - ctime > datetime.timedelta(days=days):
                os.unlink(path)