@echo off
::Configuration Section
set "GET_FTP_SERVER=192.168.2.18"
set "GET_FTP_PORT=21"
set "GET_FTP_USERNAME=oracle"
set "GET_FTP_PASSWORD=oracle"
set "GET_DIR=/opt/oracle/mmsprtdata/send"
set "PUT_FTP_SERVER=10.199.39.215"
set "PUT_FTP_PORT=21"
set "PUT_FTP_USERNAME=mmsg"
set "PUT_FTP_PASSWORD=mmsg0723"
set "PUT_DIR=/upsendmsg"
set "LOCAL_DIR=C:/MMSIGRPT"
set "BAK_DIR=/opt/oracle/xmlbak"
call :downloaddir "%GET_DIR%" "%LOCAL_DIR%"
call :uploaddir "%LOCAL_DIR%" "%PUT_DIR%"
goto :eof
:downloaddir - download directory tree
:: - %~1 remote directory
:: - %~2 local directory
setlocal
set "remotedir=%~1"
set "localdir=%~2"
echo "%GET_FTP_SERVER%>%remotedir%" ----^> "%localdir%"
call :get_autoftp cmdftp_downloaddir "%remotedir%" "%lo