用于从文本文件在 Firefox 或 Opera 的多个选项卡中自动打开 URL 的脚本
我有一个包含很多链接的文本文件 - 每行都有一个链接(即分隔符是“\n”)。我想编写一个脚本,以便每个链接在 Firefox 或 Internet Explorer 的不同选项卡中打开。我该怎么做?我使用的是 Windows 7
I have a text file with lots of links-each line has a link (i.e the separator is '\n'). i want to write a script so that each link opens in a different tab in Firefox or Internet explorer. How can I do this? I'm on Windows 7
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
对我有用的解决方案是:
我做了四项更改:
因此,文本文件 urls.txt 如下所示:
The solution that worked for me is:
Four changes I made:
So, the text file urls.txt looks like:
创建一个名为whatever.bat 的文本文件并将其放在桌面上。编辑文件并输入:
关闭并保存
双击它
注意:C:\Documents and Settings\mdevine\Desktop\urls.txt 是一个文本文件,包含以下内容:
Create a text file called whatever.bat and put it on your desktop. edit the file and enter:
close and save
double click on it
Note: C:\Documents and Settings\mdevine\Desktop\urls.txt is a text file that contains the following:
@iceman、@amadain:
完善@amadains 解决方案:
批处理文件中的“行继续符”是^,因此iceman应该相应地更改他的文本文件(在每行末尾添加一个^)并将“start firefox ^”放在文件的开头。但不知道命令行字符串的最大长度。
@iceman, @amadain:
refining @amadains solution:
the "line continuation character" in batch files is ^, so iceman should change his text files accordingly (add a ^ at the end of each line) and put "start firefox ^" at the beginning of the file . Don't know max length of command line string, though.
如果有人正在寻找如何在 Chrome 中执行此操作,这里是解决方案:
将此代码另存为批处理文件,然后双击即可。
注意=号之前没有空格
当我尝试使用空间时,它对我不起作用
If anyone is looking for how to do this in Chrome, here is the solution :
Save this code as batch file and just double click.
Note that there is no space before the = sign
It wasn't working for me when i tried with space