def METHOD_NAME(args):
    compile(args)
    error = False
    for dir in args.directory:
        print "running files in", dir
        files = []
        for (dirpath, dirnames, filenames) in os.walk(dir):
            for filename in get_templates_from_list(filenames):
                files.append(filename)
        files.sort(cmp=template_compare_filename)
        for file in files:
            file_return = run_file(os.path.join(dir, get_file_from_template(file)))
            if file_return != 0:
               error = True
               break
        if error:
           break;
    if error:
        sys.exit(1)