yangliuhepanpan 2014-05-28
第一、需要的工具
(1)ftpcmd.exe
(2)plink.exe
第二、实现download
download.bat
@echooff
setlocal
if"%BMP_HOST%"==""gotoexit
if"%BMP_USER%"==""gotoexit
if"%BMP_PASSWORD%"==""gotoexit
if"%1"==""gotoexit
if"%2"==""gotoexit
if"%3"==""gotoexit
setDST=%3
ifnot"%4"==""setDST=%4
ftpcmdget--passive--imagetrue--host%BMP_HOST%--username%BMP_USER%--password%BMP_PASSWORD%--remote"%1"--local"%2"--src"%3"--dst"%DST%"
del/q"%~dp0\*.url"
endlocal
exit
第三、实现upload
@echooff
if"%BMP_HOST%"==""gotoexit
if"%BMP_USER%"==""gotoexit
if"%BMP_PASSWORD%"==""gotoexit
if"%1"==""gotoexit
if"%2"==""gotoexit
if"%3"==""gotoexit
ftpcmdput--passive--imagetrue--host%BMP_HOST%--username%BMP_USER%--password%BMP_PASSWORD%--remote"%1"--local"%2"--src"%3"--dst"%3"
del/q"%~dp0\*.url"
exit