CMD气象数据批量下载程序

问题:中国气象数据共享网,现在提供的是许多由链接组成的txt文件,我们不可能一条一条去下载,我写了如下这个批量处理程序(bat)。

Usage: 复制下面的代码到txt文件 ,另存为bat文件;修改路径;同时修改你从CMD下载的包含链接的文本文件。Done!

有任何问题,请Email给我。

REM
@echo on 

rem  print current dir
echo %cd%

wget -P ./all_data_1980-1984 -i S201906131531533621300.txt
wget -P ./all_data_1980-1984 -i S201906131531533621301.txt
wget -P ./all_data_1980-1984 -i S201906131531533621302.txt
wget -P ./all_data_1980-1984 -i S201906131531533621303.txt
wget -P ./all_data_1980-1984 -i S201906131531533621304.txt
wget -P ./all_data_1980-1984 -i S201906131531533621305.txt
wget -P ./all_data_1980-1984 -i S201906131531533621306.txt
wget -P ./all_data_1980-1984 -i S201906131531533621307.txt
wget -P ./all_data_1980-1984 -i S201906131531533621308.txt
wget -P ./all_data_1980-1984 -i S201906131531533621309.txt
wget -P ./all_data_1980-1984 -i S201906131531533621310.txt
wget -P ./all_data_1980-1984 -i S201906131531533621311.txt
wget -P ./all_data_1980-1984 -i S201906131531533621312.txt
wget -P ./all_data_1980-1984 -i S201906131531533621313.txt
wget -P ./all_data_1980-1984 -i S201906131531533621314.txt
wget -P ./all_data_1980-1984 -i S201906131531533621315.txt
wget -P ./all_data_1980-1984 -i S201906131531533621316.txt
wget -P ./all_data_1980-1984 -i S201906131531533621317.txt
wget -P ./all_data_1980-1984 -i S201906131531533621318.txt
wget -P ./all_data_1980-1984 -i S201906131531533621319.txt


rem redirected to a new dir
set current_dir=I:\Data_ZL\Data_download\CMD-Cliamte_data\1980-1984\all_data_1980-1984
pushd %current_dir% 

rem rename the postfix
ren *.* *.txt

pause
Updated: 2019-06-14 — pm4:59

Leave a Reply

  Subscribe  
Notify of