好就一文本文件,读入再修改 open "C:\1.bat" for input as #1 do while eof(1) line input #1,sLineCommand text1.text = text1.text & vbcrlf & slineCommand Loop close #1 text1.text = text1.text & vbcrlf & "Dir C:\" open "C:\1.bat " for output as #1 print #1,text1.text Close #1 close #1
干嘛还用BAT呢?
open "C:\1.bat" for input as #1
do while eof(1)
line input #1,sLineCommand
text1.text = text1.text & vbcrlf & slineCommand
Loop
close #1
text1.text = text1.text & vbcrlf & "Dir C:\"
open "C:\1.bat " for output as #1
print #1,text1.text
Close #1
close #1