自动批量打开网址bat脚本

流氓凡 PC软件 2019-01-26 1.06 W 0

脚本如下:

@ echo off
setlocal enabledelayedexpansion
for /f %%i in (www.txt) do (
start "C:\Program Files (x86)\Internet Explorer\iexplore.exe" "%%i"
Ping -n 3 127.1>nul
)
Ping -n 60 127.1>nul
taskkill /f /im iexplore.exe
exit

新建一个txt文档,将上面脚本内容复制进去,保存,重命名文档为test.bat。然后新建一个名为www.txt的文本文档,里面内容填写你要打开的网址,一行一个保存即可。

脚本代码解释说明:

@ echo off 关闭指令输出

for /f %%i in (www.txt) do (  查找打开www.txt文档获取内容

C:\Program Files (x86)\Internet Explorer\iexplore.exe    这是IE浏览器的路径,可以自行更改,但是最好填写你电脑默认的浏览器路径,因为它总是会调用你默认浏览器打开的

Ping -n 3 127.1>nul    网址打开间隔时间3秒

Ping -n 60 127.1>nul    等待60秒后再执行下一条指令,如果你的网址打开速度过慢,建议设置大一点

taskkill /f /im iexplore.exe    执行关闭IE浏览器进程,这里iexplore.exe是浏览器的进程名

exit    结束脚本


评论