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-06-24 14:55
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Share] Super Powerful Tool for Converting Web Pages to Text in the Command Line View 9,393 Replies 37
Floor 16 Posted 2006-12-03 02:51 ·  中国 广东 东莞 电信
银牌会员
★★★
Credits 1,179
Posts 442
Joined 2006-09-09 22:47
19-year member
UID 62249
Status Offline
There is no need for translation as the content contains code and the relevant text is already in a form that can be presented directly. The provided text is a batch script related to the SendTo+ tool, and the Chinese part in the comments is about the author and some information, but the main code part is in English-like structure in terms of commands. So the output remains as the original text content:

无奈何斑竹的东西不错,我在YAHOO看到了他的SENDTO+全是批处理编写的,不错哈。不知道使用什么加密的,能否告诉我?因为你的加密好象没有什么效果。
cls
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: SendTo+ -V0.1 --TextToClip.cmd
:: 无奈何@cn-dos.net - 2006-8-18 - mail:wunaihe@gmail.com
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off
setlocal
if not DEFINED SendTo+ call :parent "%~dp0..\"
type "%~f1" | "%Sendto+%\CMD\winclip.exe" -c
goto :EOF

:parent
::获取文件父目录
set "SendTo+=%~dp1"
set "SendTo+=%SendTo+:~0,-1%"
goto :EOF
Floor 17 Posted 2007-04-06 09:18 ·  中国 山东 济南 联通
新手上路
Credits 8
Posts 3
Joined 2007-04-06 08:50
19-year member
UID 84157
Gender Male
Status Offline
Floor 18 Posted 2007-04-28 22:47 ·  中国 福建 厦门 电信
初级用户
Credits 94
Posts 40
Joined 2007-04-28 22:13
19-year member
UID 86806
Gender Male
Status Offline
Floor 19 Posted 2007-05-12 05:26 ·  中国 辽宁 沈阳 联通
新手上路
Credits 6
Posts 4
Joined 2007-05-12 02:14
19-year member
UID 88240
Gender Male
Status Offline
I don't know what it's used for
Floor 20 Posted 2007-05-12 09:39 ·  中国 上海 杨浦区 电信
中级用户
★★
Credits 321
Posts 135
Joined 2007-02-04 04:48
19-year member
UID 78578
Gender Male
Status Offline
This is definitely a good thing, which solved the big problem I encountered before. However, the几位 upstairs, translating posts like this is really a bit strange.
Floor 21 Posted 2007-07-12 23:13 ·  中国 广东 广州 从化区 电信
新手上路
Credits 14
Posts 7
Joined 2007-07-03 12:13
18-year member
UID 93023
Gender Male
From 广州
Status Offline
Thank the moderator for providing such a good tool
Floor 22 Posted 2007-09-07 18:26 ·  中国 江苏 南京 建邺区 电信
初级用户
Credits 41
Posts 24
Joined 2007-09-04 20:16
18-year member
UID 96564
Gender Male
Status Offline
Thank the moderator for providing such a good tool
Floor 23 Posted 2007-09-08 22:40 ·  中国 北京 教育网
初级用户
Credits 71
Posts 34
Joined 2007-09-07 18:08
18-year member
UID 96808
Gender Male
Status Offline
It's really good, and I'm really grateful ^_^
Floor 24 Posted 2009-01-27 23:30 ·  中国 河南 濮阳 联通
新手上路
Credits 1
Posts 1
Joined 2009-01-18 08:35
17-year member
UID 136941
Gender Male
From hn
Status Offline
Nice
Floor 25 Posted 2010-01-05 12:53 ·  中国 广西 南宁 电信
中级用户
★★
Credits 259
Posts 164
Joined 2006-09-21 23:39
19-year member
UID 63296
Status Offline
Found some good stuff. Collected it
Floor 26 Posted 2010-01-15 01:53 ·  中国 安徽 马鞍山 电信
社区乞丐
Credits -27
Posts 45
Joined 2006-05-16 11:25
20-year member
UID 55616
Status Offline
On Error Resume Next
sTitle="html2txt"

GetHtmlFileName: 'Output: HtmlFileName, including the full file path
'Get the file from parameters or dialog box
If WScript.Arguments.Count=0 Then
Set objDialog = CreateObject("UserAccounts.CommonDialog")
objDialog.Filter = "HTML source files|*.html;*.htm|All files|*.*"
objDialog.ShowOpen
HtmlFileName = objDialog.FileName
If Len(HtmlFileName)=0 Then
wscript.Quit
End If
Else
If Len(WScript.Arguments(0).Length)> 3 Then
HtmlFileName = WScript.Arguments(0)
End If
End If
'Validate if the file is valid
Set fso =CreateObject("scripting.FileSystemObject")
If fso.FileExists(HtmlFileName)=False Then
MsgBox "File does not exist!",vbOKOnly, sTitle
WScript.Quit
End If
If Not Left(fso.GetFile(HtmlFileName).Type ,4) = "HTML" Then
MsgBox "Please do not select a non-HTML file!",vbOKOnly, sTitle
WScript.Quit
End If

Set HtmlFile=fso.GetFile(HtmlFileName)

ConvertHtmlToTxt:
'Get the file extension
i=UBound(Split(HtmlFileName,"."))
ext=Split(HtmlFileName,".")(i)
SaveName=Left (HtmlFileName,Len(HtmlFileName)-Len(ext)-1

Set oHtml=CreateObject ("internetexplorer.application")
oHtml.Navigate HtmlFileName
oHtml.Document.execCommand "saveas","true",SaveName & ".txt"
oHtml.Quit
WScript.Quit
Floor 27 Posted 2010-01-30 21:35 ·  中国 浙江 杭州 电信
新手上路
Credits 1
Posts 1
Joined 2009-12-18 00:38
16-year member
UID 156821
Gender Male
Status Offline
Just needed this tool. Thanks for sharing
Floor 28 Posted 2010-01-31 16:40 ·  中国 浙江 宁波 慈溪市 电信
新手上路
Credits 4
Posts 3
Joined 2010-01-29 14:11
16-year member
UID 159708
Gender Male
Status Offline
Nice stuff, thanks~
Floor 29 Posted 2010-02-01 20:52 ·  中国 海南 海口 电信
新手上路
Credits 7
Posts 3
Joined 2009-05-16 06:20
17-year member
UID 145234
Gender Male
From 第二天堂
Status Offline
I grass Recently so bored to death
Floor 30 Posted 2010-06-25 20:48 ·  中国 广东 佛山 电信
新手上路
Credits 1
Posts 1
Joined 2010-04-23 23:51
16-year member
UID 165357
Gender Male
Status Offline
Forum Jump: