Windows console command to open multiple pages in Internet Explorer 7

﹥>﹥吖頭↗ 提交于 2019-12-14 03:49:40

问题


How do I open multiple pages in Internet Explorer 7 with a single DOS command? Is a batch file the only way to do this?

Thanks!


回答1:


A batch file will work as a quick and dirty solution.

@echo off
@setlocal

:openurl
set url=%~1

if "%url:~0,4%" == "http" (
   start "%ProgramFiles%\Internet Explorer\iexplore.exe" "%url%"
)
if NOT "%url:~0,4%" == "http" (
   start "%ProgramFiles%\Internet Explorer\iexplore.exe" "http://%url%"
)

shift
if "%~1" == "" goto :end
goto :openurl

:end

Edit: added support for domain names without http handler prefix.




回答2:


  1. open a txt file with .txt extension
  2. Add the below lines

    • start www.google.com
    • start www.yahoo.com
    • start www.microsoft.com
  3. save the file, select rename on the file and change the extension from .txt to .cmd

  4. double click the .cmd file to execute



回答3:


Unfortunately, there is no way to include multiple URLs as command-line parameters. Here is a a blog post which details another (fairly convoluted) way to do it via Javascript.




回答4:


I’ve downloaded the software that does exactly this. From a command line open several websites without having to copy, paste VB scripts or batch files, etc… It’s available at http://www.multiwebpageopener.com.



来源:https://stackoverflow.com/questions/118748/windows-console-command-to-open-multiple-pages-in-internet-explorer-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!