首页 > 代码库 > 批量运行文件

批量运行文件

#coding=utf-8import  osimport  timedef Rename(foldname):    for parent,dirnames,filenames in os.walk(foldname):        for filename in filenames:            os.rename(os.path.join(parent, filename), os.path.join(parent, filename+‘.exe‘))            time.sleep(2)            os.system(os.path.join(parent,filename))Rename(‘c:\\test\\‘)