|
|
本帖最后由 pcl_test 于 2016-9-29 10:40 编辑
批处理代码如下(实现提取A.TXT内第一行命令并执行,并自动流水移动修改A.TXT每行命令的排序)- more +1 A.txt>>C.txt
- for /f "tokens=*" %%a in (A.txt) do (
- echo %%a>>C.txt
- goto next
- )
- :next
- del A.txt&ren C.txt A.txt
- for /f "tokens=*" %%a in (A.txt) do (
- %%a
- exit
- )
复制代码 A.TXT文本文件内容如下:
echo set ws = createobject("wscript.shell"):ws.run "iexplore http://www.baidu.com",1 >a.vbs & a.vbs
echo set ws = createobject("wscript.shell"):ws.run "iexplore http://www.qq.com",1 >a.vbs & a.vbs
echo set ws = createobject("wscript.shell"):ws.run "iexplore http://www.sogou.com",1 >a.vbs & a.vbs |
|