1 #folder for output 2 outDir = "D:\\ddd" 3 #After which line start to add new sentence 4 startAdd = 'Telnet WatchFor Fail "ERROR"' 5 #The keyword checked sentence we wanna add 6 ItemAdd = ['Telnet WatchFor Fail "Error"','Telnet WatchFor Fail "error"'] 7 8 9 def changeItems(path,pathout): 10
Python 实现在对一个目录下所有文件,指定某一行之后添加内容(批处理脚本)...
最新推荐文章于 2023-04-16 17:30:25 发布