import sys | |
import os | |
ps_trace_folder = sys.argv[1] | |
for subdir, dirs, files in os.walk(ps_trace_folder): | |
for file in files: | |
if file.endswith(".h"): | |
filepath = subdir + os.sep + file | |
newfilepath = subdir + os.sep + file.replace(".h", "_precodegen.h") | |
os.rename(filepath, newfilepath) |