Windows本地机下载Linux远程机的文件

http://www.oschina.net/code/snippet_101619_58325

@echooff

set_remote_ip=192.168.137.128

set_remote_file_dir=/home/software

set_remote_username=root

set_remote_password=sy31214

set_local_file_dir=D:\

set_today=%DATE:~0,4%%DATE:~5,2%%DATE:~8,2%

ping-n1%_remote_ip%>nul

pscp-l%_remote_username%-pw%_remote_password%%_remote_ip%:%_remote_file_dir%/cmake-3.3.0-rc4.tar.gz%_local_file_dir% >out.txt

set/pout_status=<out.txt

if"%out_status:~-4%"=="100%"(

echo"%_today%数据库备份文件下载成功"

)

相关推荐