China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 11:13
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] Ask why my batch script that opens multiple web pages can only open one web page View 2,966 Replies 8
Original Poster Posted 2004-11-03 00:00 ·  中国 江苏 南京 秦淮区 电信
中级用户
★★
Credits 307
Posts 58
Joined 2004-10-21 00:00
21-year member
UID 32780
Gender Male
Status Offline
I would like to ask why my batch script that opens multiple web pages can only open one web page?

I executed the following batch script
@echo off
set ie="C:\Program Files\Internet Explorer\IEXPLORE.EXE"
%ie% www.cn-dos.net/dosbbs/list.asp?boardid=9
%ie% www.lasg.ac.cn/cgi-bin/forum/leoboard.cgi
%ie% bbs.chinaunix.net/forum/viewforum.php?f=24
:: ... Add all the websites you need to open in the above way
set ie=
exit
As a result, after executing for a long time, only the first web page is opened, and the DOS command port keeps flashing and does not close.
While in another DOS window, I can use the command to open the above websites one by one?
Why? I hope for your advice, thanks in advance!
Floor 2 Posted 2004-11-03 00:00 ·  中国 河北 石家庄 联通
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline
Add the start command before %ie% in each line, for example:
start %ie% www.cn-dos.net/dosbbs/list.asp?boardid=9
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 3 Posted 2004-11-03 00:00 ·  中国 江苏 南京 秦淮区 电信
中级用户
★★
Credits 307
Posts 58
Joined 2004-10-21 00:00
21-year member
UID 32780
Gender Male
Status Offline
I just tried your method, and the result is that only the last website can be opened, and this website will also overwrite the first website I opened before executing this batch processing. Why? I hope you can give me some advice. I tested it under win2000.
Floor 4 Posted 2004-11-04 00:00 ·  中国 广东 广州 电信
金牌会员
★★★★
D◎$ Fαп
Credits 4,562
Posts 1,883
Joined 2004-01-19 00:00
22-year member
UID 15812
Gender Male
From 广东广州
Status Offline
What the person above said is right. I tried it, and it should be changed to the following:
@echo off
set ie=start C:\Progra~1\Intern~1\IEXPLORE.EXE
%ie% www.cn-dos.net/dosbbs/list.asp?boardid=9
%ie% www.lasg.ac.cn/cgi-bin/forum/leoboard.cgi
%ie% bbs.chinaunix.net/forum/viewforum.php?f=24
Pay attention! I changed the original folder names "Program Files" and "Internet Explorer" in the line "SET IE=" to the short filename format to make it work.
----====≡≡≡≡ 我的至爱,永远是MSDOS!≡≡≡≡====----
Floor 5 Posted 2004-11-04 00:00 ·  中国 广东 广州 电信
金牌会员
★★★★
D◎$ Fαп
Credits 4,562
Posts 1,883
Joined 2004-01-19 00:00
22-year member
UID 15812
Gender Male
From 广东广州
Status Offline
This batch script calls IE to open a web page. But as for me personally, I really dislike using IE, this "resource hog"! I suggest the thread starter use Maxthon (Aoyou) or MyIE2 to surf the web. There is an item called "Quick Group" in the menu of this browser, which can arbitrarily add multiple web pages to open at one time. Later, as long as you click the mouse, several web pages will come out one after another.
----====≡≡≡≡ 我的至爱,永远是MSDOS!≡≡≡≡====----
Floor 6 Posted 2004-11-04 00:00 ·  中国 江苏 南京 秦淮区 电信
中级用户
★★
Credits 307
Posts 58
Joined 2004-10-21 00:00
21-year member
UID 32780
Gender Male
Status Offline
Thanks to JonePeng, but "Attention, I changed the original folder names Program Files and Internet Explorer in the line "SET IE=" to the short filename format to make it work. "Why didn't my method work? What's the reason? If you can explain it, it would be perfect.
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
dingzylu +1 2007-05-16 09:32
Floor 7 Posted 2004-11-05 00:00 ·  中国 广东 广州 天河区 电信
金牌会员
★★★★
D◎$ Fαп
Credits 4,562
Posts 1,883
Joined 2004-01-19 00:00
22-year member
UID 15812
Gender Male
From 广东广州
Status Offline
Hehe, because your batch processing runs under DOS, and DOS does not support long folder names (I tried it in the command prompt of XP, and it also doesn't support), so it has to be changed to the short file name format. If you don't change it to the short file name format, then that batch processing will execute like this: start c:\Program Files\Internet Explorer.exe www.cn-dos.net, and a prompt box will pop up: something like "can't find Program" and so on. Also, in the command prompt of Win2000/XP, the folder names you see are all in long format. So how to display the short format? You just need to type DIR /X /AD to see it. For example, Program Files is displayed as Progra~1, Document and Settings becomes Docume~1, and so on.
----====≡≡≡≡ 我的至爱,永远是MSDOS!≡≡≡≡====----
Floor 8 Posted 2004-11-05 00:00 ·  中国 河北 石家庄 联通
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline
It's not because of the long filename, but because of the command-line parameters of the Start command. The Start command treats the content enclosed in the first pair of double quotes as the title line, so the command line of IE is treated as the title line, which will obviously cause problems. The original batch script should be modified as follows:
@echo off
set ie=start "Internet Explorer" "C:\Program Files\Internet Explorer\IEXPLORE.EXE"
%ie% www.cn-dos.net/dosbbs/list.asp?boardid=9
%ie% www.lasg.ac.cn/cgi-bin/forum/leoboard.cgi
%ie% bbs.chinaunix.net/forum/viewforum.php?f=24
:: ... Add all the websites you need to open in the above way
set ie=
exit
In addition, I also recommend using Maxthon (MyIE2) to replace IE. Its shortcut groups are much more convenient than this batch script.
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 9 Posted 2004-11-05 00:00 ·  中国 江苏 南京 秦淮区 电信
中级用户
★★
Credits 307
Posts 58
Joined 2004-10-21 00:00
21-year member
UID 32780
Gender Male
Status Offline
Forum Jump: