#coding=utf-8 import os import time def 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\\‘)
批量运行文件
时间: 2024-10-08 13:55:42