中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-08 22:14
47,811 topics / 349,895 posts / today 0 new / 48,253 members
DOS批处理 & 脚本技术(批处理室) » [Original] Batch Processing to Implement Web Page Download (260 bytes)
Printable Version  6,405 / 18
Floor1 electronixtar Posted 2006-11-01 05:22
铂金会员 Posts 2,672 Credits 7,493
1. Download the obtained web page source code


2. Download the obtained web page text
Floor2 electronixtar Posted 2006-11-01 05:26
铂金会员 Posts 2,672 Credits 7,493
Tips:
1. The parameters of this batch processing are relatively strict: there must be http:// or ftp:// before the URL, otherwise an error will occur.
For example, I save the second code as: iGet.bat, then I run
iGet.bat ftp://www.dormforce.net can get the content of an FTP, and then combine with for to output the list of FTP

2. This batch processing will directly output the result to the screen. To save it to a file, use > or >> for redirection

3. The advantage of this batch processing is that it does not require any components (xmlhttp) and can automatically handle encoding problems. The disadvantage is: if the original web page has pop-up ads, it will still pop up. If you want to completely download in the background quietly, you can use the classic iGet.vbs http://xxxxxx C:\down.htm
This iGet.vbs cannot directly get the web page text


[ Last edited by electronixtar on 2006-11-1 at 05:42 AM ]
Floor3 vkill Posted 2006-11-01 05:28
金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽
Floor4 electronixtar Posted 2006-11-01 05:30
铂金会员 Posts 2,672 Credits 7,493
I do have an idea. Like


@echo off
<"%~f0" more +5 >tmp.vbs
cscript //NoLogo /e:vbscript tmp.vbs %1
del tmp.vbs
goto:eof

In this way, I have to repeat writing it every time. It would be better to establish a standard batch processing header that can be referenced (include) by the China DOS Union, so that everyone's formats can be unified.

If there are experts who can write a batch processing IDE, heh, it can greatly simplify the writing of batch processing.

[ Last edited by electronixtar on 2006-11-1 at 05:32 AM ]
Floor5 vkill Posted 2006-11-01 05:36
金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽
Originally posted by electronixtar at 2006-11-1 05:30:
I actually have an idea, like

this, every time I have to repeat writing, it might be better for the union to establish a standard batch processing header that can be included, and then everyone's format ...

I'm thinking:
set/p 1= Batch processing name:
set/p 2= Batch processing intermediate content:
echo .............

Just thinking about it, but it's best to come up with a writing standard, so that it's easier to read, not written like天书one by one. For example, first write at the beginning
:: Idea:
:: Principle:
and so on
Floor6 无奈何 Posted 2006-11-01 06:42
荣誉版主 Posts 356 Credits 1,338
Re electronixtar

You can specify the template file in "New".
For example, save the above content to D:\BAT\template.cmd
Then add the following registry entry.
Floor7 electronixtar Posted 2006-11-09 11:30
铂金会员 Posts 2,672 Credits 7,493
There is no translation needed as the text is in Chinese but the request is to translate from Chinese to English. Wait, no, the user provided "无奈何 兄高招啊!学习" which is Chinese. So the translation is "Brother Nai Wu He, great move! Learning"
Floor8 ccwan Posted 2006-11-09 21:26
金牌会员 Posts 1,160 Credits 2,725 From 河北廊坊
Floor9 scriptor Posted 2006-12-22 16:17
银牌会员 Posts 555 Credits 1,187
Not bad

But still borrowed methods like vbs, etc. Can it only use DOS commands and not use IE?
Purely in the DOS black interface, that would be even better.

Haha...
Who can write a batch?
Floor10 wudixin96 Posted 2007-04-07 00:17
银牌会员 Posts 931 Credits 1,928
Cheating. Using VBS. o(∩_∩)o... Haha. But also learned.
Floor11 everest79 Posted 2007-04-07 01:23
金牌会员 Posts 1,127 Credits 2,564
est has been missing for a while oh

The following is what I got from the Internet

Floor12 everest79 Posted 2007-04-07 01:39
金牌会员 Posts 1,127 Credits 2,564
After seeing the thread starter's post, I have a vague idea. Can the hidden execution of batch processing that we have been pursuing all the time also be achieved by using a template VBS?
Floor13 estar Posted 2007-04-07 05:21
中级用户 Posts 103 Credits 346
Floor14 everest79 Posted 2007-04-07 07:12
金牌会员 Posts 1,127 Credits 2,564
To be honest, are you a sock puppet?
Floor15 ygrzzz Posted 2008-09-26 22:54
初级用户 Posts 24 Credits 62
The LZ moved the VBS code into the batch file and gave the VBScript script a new coat~~~

Can there be another pair of batch processing pants under this coat?
That is, the batch processing completes part of the work
When encountering weak functions, it then uses VBS to assist, and the two are mixed, such as



The actual effective process of the program is that VBS completes part of the task first, and then the batch processing completes the remaining tasks
I'm a novice, but I've collected a large number of various codes. Some VBS code has a good single function and I want to use it with the help, and then use the relatively easy-to-understand batch processing to make some functional evolutions
Is this idea feasible?
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023