如果瀏覽器的安裝路徑中有空格,可以用“ ”代替,如下:
C:/Program Files/Mozilla Firefox/firefox.exe
可以替換為C:/Program" "Files/Mozilla" "Firefox/firefox.exe
1、用IE瀏覽器打開網頁的批處理代碼:start c:/progra~1/Intern~1/iexplore.exe 網址
例子:
@echo off title 打開網頁 start c:/progra~1/Intern~1/iexplore.exe "http://www.baidu.com"
2、用谷歌瀏覽器打開網頁的批處理代碼:安裝路徑 網址
例子:
@echo off title 打開網頁 start C:/Users/Administrator/AppData/Local/Google/Chrome/Application/chrome.exe http://www.google.com.hk
3、用火狐瀏覽器打開網頁的批處理代碼:安裝路徑 網址
例子:
@echo off title 打開網頁 start C:/Program" "Files/Mozilla" "Firefox/firefox.exe "http://www.163.com"
4、批量打開網頁的代碼(轉載):
@echo off mode con lines=16 title 批量打開網頁 color 2f cls echo. echo 現在是 %date% %time%echo echo ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ start www.baidu.com start www.companysz.com echo 開啟完成,正在返回!
5、關閉瀏覽器的批處理代碼:
@echo off title 結束進程 taskkill /f /t /im iexplore.exe taskkill /f /t /im chrome.exe taskkill /f /t /im firefox.exe
以上就是cmd批量打開網頁和關閉網頁的批處理代碼,大家可以多測試一下
新聞熱點
疑難解答