バッチFTPスクリプトバックアップ



@echo off
set /p ip=Please input Product Operating System ip:
set /p username=Please input Product Operating System Username (eg:root):
set /p password=Please input Product Operating System Password (eg:root):
set /p absolutepath=Please input the absolute path that files to upload (eg:/root):
echo **************************************
echo ****1.memaudit_aix64_v2.5.0.17.tar****
echo ****2.memaudit_hpux64_v2.5.0.17.tar***
echo ****3.memaudit_linux64_v2.5.0.17.tar**
echo **************************************
set /p number=Please the number your want to upload:
if "%number%" =="1" set memaudit=memaudit_aix64_v2.5.0.17.tar
if "%number%" =="2" set memaudit=memaudit_hpux64_v2.5.0.17.tar
if "%number%" =="3" set memaudit=memaudit_linux64_v2.5.0.17.tar
echo open %ip%>ftp.txt
echo %username%>>ftp.txt
echo %password%>>ftp.txt
echo cd %absolutepath%>>ftp.txt
echo binary>>ftp.txt
echo prompt >>ftp.txt
echo lcd ..>>ftp.txt
echo lcd monitor\linux\client>>ftp.txt
echo mput bypassmonitor.tar>>ftp.txt
echo lcd ..>>ftp.txt
echo lcd ..>>ftp.txt
echo lcd ..>>ftp.txt
echo lcd ..>>ftp.txt
echo lcd memaudit_release>>ftp.txt
echo mput %memaudit%>>ftp.txt
echo bye>>ftp.txt
ftp -s:ftp.txt
pause
del ftp.txt