1. 创建一个bat 文件 FTPAndZip.bat
2. 创建一个ftpscript.txt
echo download files from ftp
ftp -n -s:E:\infa_shared\SrcFiles\eVestment\ftpscript.txt
echo unzip file
E:\infa_shared\SrcFiles\eVestment\unzip.exe -o E:\infa_shared\SrcFiles\eVestment\data\EAHF.zip -d E:\infa_shared\SrcFiles\eVestment\data\EAHF\
if %errorlevel% neq 0 (
echo %DATE% %TIME% [ERROR] error when extract files
exit 5
)
echo %DATE% %TIME% [INFO] success
exit 0
2. 创建一个ftpscript.txt
open datafeeds.evestment.com
user
ftpusername
ftppassword
prompt
get EAHF.zip E:\infa_shared\SrcFiles\eVestment\data\EAHF.zip
get ExpandedDataSet.zip E:\infa_shared\SrcFiles\eVestment\data\ExpandedDataSet.zip
quit