首页 > 编程知识 正文

Winscp同步_(原始)用Winscp软件同步本地或远程文件(1)

时间:2023-05-05 00:39:28 阅读:239385 作者:54

# winscp.exe /console /script=sample.txt

# Automatically answer all prompts negatively not to stall

# the script on errors

# option echo  on|off

option echo off

# option batch on|off|abort|continue

option batch on

# option confirm  on|off

option confirm off

# option transfer  binary|ascii|automatic

# option synchdelete  on|off

# option exclude clear | [;...]

# option include clear | [;...]

# open [ sftp|ftp|scp:// ][ [ :password ] @ ] [ : ]

# open user:password@example.com

# Connect   FTP地址open ftp://用户名:密码@outftp.test.com:21

# Change remote directory

# cd /home/user   如果同步到远程FTP时,可用此命令转到远程某个目录下.

# Change local directory

# set to Self's working dir  设置需要同步到远程FTP的本地文件目录lcd D:TempTest_Ftp

# Force binary mode transfer

option transfer binary

# Download file to the local directory d:

# get examplefile.txt d:

# option synchdelete  on|off

option synchdelete off

# option include clear | [;...]

# option include /2008-*-*/;/2009-*-*/;/2010-*-*/;/2011-*-*/;/2012-*-*/;/2013-*-*/

# synchronize local|remote|both [ [ ] ] 从远程同步到本地用Local;从本地同步到远程用Remotesynchronize local

# Disconnect

close

# Exit WinSCP

exit

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。