遇上加了/IP参数还是乱码的怎么办?
htm文件使用记事本打开时是UTF-8编码的。- @echo off
- curl -o 123.txt http://www.sge.sh/publish/sge/xqzx/jyxq/index.htm
- md htm
- pause
- title 下载数据文件
- set n=0
- setlocal enabledelayedexpansion
- for /f "delims=><= tokens=4skip=170" %%i in (123.txt) do (
- set a=%%i
- echo http://www.sge.sh/publish/sge/xqzx/jyxq/%%i
- if "!a:~-4,3!"=="htm" set /a n+=1 & echo %%i !n! & curl -o htm\!n!.htm http://www.sge.sh/publish/sge/xqzx/jyxq/%%i
- )
-
- title 转换文件格式
- HtoX32c /ip /O0 htm\*.htm
- md txt 2>nul
- move htm\*.txt txt\>nul
- pause
- exit
复制代码
|