标题: [文件操作] [已解决]curl.exe可以将网址直接转存为txt文件吗? [打印本页]
作者: qwertl 时间: 2009-12-16 09:22 标题: [已解决]curl.exe可以将网址直接转存为txt文件吗?
看了下curl.exe的帮助,有-o开关或用dos的>将个网址内容转为html文件,现有没有直接将个网址保存为文本格式的功能,类似通过IE浏览器点文件菜单》》另存为》》选保存类型为txt文本》》输入自订文件名》》点确定 后保存的操作。- curl http://www.ahjoe.net/regip/hostlist.asp >1.html
复制代码
这样生成的只能是浏览器打开1.html格式才正常显示。
[ 本帖最后由 qwertl 于 2009-12-16 14:46 编辑 ]
作者: qwertl 时间: 2009-12-16 11:38
从IE另存为txt的格式为:
日期时间 主机名 IP地址 HTTP FTP
2009-12-15 17:21:28 1000 123.87.15.51 HTTP FTP
2009-12-15 12:44:38 pc-20 59.37.209.86 HTTP FTP
2009-12-15 00:30:24 ahjoe 58.251.97.66 HTTP FTP
2009-12-13 23:53:03 pc-200910180928 116.4.12.132 HTTP FTP
作者: qwertl 时间: 2009-12-16 14:45
找到了:
curl http://www.ahjoe.net/regip/hostlist.asp >1.html
htmlastext.exe /run "c:\h2t.cfg"
先生成个转换的配置文件,再用命令行调用。
Converting HTML files from command-lineIn order to convert HTML files from command-line, you have to save the desired conversion options to configuration file (by using 'Save Config' option), and then run the HTMLAsText utility with /run option, followed by the configuration filename.
For example:
htmlastext.exe /run "c:\temp\convert.cfg"
作者: Batcher 时间: 2009-12-16 15:02
HTML转TXT的另一种方法:HtoX32c
第三方命令行工具 HtoX32c.exe 下载地址:
http://bbs.bathome.net/thread-3981-1-1.html
欢迎光临 批处理之家 (http://www.bathome.net/) |
Powered by Discuz! 7.2 |