机器人 救救瓜
Toggle navigation
Home
SCM-tool
Linux
Jenkins
SVN
other
About Me
Archives
Tags
使用winscp 从 linux server 到 win7 的定时下载任务
2020-11-23 14:23:08
761
0
0
gua_l
### 工具 winscp windows 7 , WinSCP-5.9.3-Portable ### winscp 工具的命令 https://winscp.net/eng/docs/commandline ``` winscp> help call Executes arbitrary remote command cd Changes remote working directory checksum Calculates checksum of remote file chmod Changes permissions of remote file close Closes session echo Displays its arguments as message exit Closes all sessions and terminates the program get Downloads file from remote directory to local directory help Displays help keepuptodate Continuously reflects changes in local directory on remote one lcd Changes local working directory lls Lists the contents of local directory ln Creates remote symbolic link lpwd Prints local working directory ls Lists the contents of remote directory mkdir Creates remote directory mv Moves or renames remote file open Connects to server option Sets or shows value of script options put Uploads file from local directory to remote directory pwd Prints remote working directory rm Removes remote file rmdir Removes remote directory session Lists connected sessions or selects active session stat Retrieves attributes of remote file synchronize Synchronizes remote directory with local one ``` ### 用winscp 工具的命令将文件从linux server 下载到本地pc , winscp 可识别的命令写于getfile.txt ``` option transfer binary open scp://lcf:lcf@172.0.xx.xx lcd E:/backup/ cd /backup ls get *tar.gz_202* lpwd lls echo download finish!! close exit ``` ### bat 脚本 使用 bat 脚本调用winscp 程序去执行getfile.txt 中的命令。 ``` dir del E:\backup\*gz_202* dir set D=%Date:~0,4%%Date:~5,2%%Date:~8,2% call "D:\wincsp\exe\WinSCP.exe" /console /script=getfile.txt /log=E:\backup\get_%D%.log ``` ### 设置计划任务 控制面板--管理工具--任务计划程序 创建任务: 1. 触发器中新建触发器,设置触发的时间或事件 2. 操作中新建操作,程序或脚本是填写bat 脚本,带绝对路径和脚本名。 下方"**起始于**",**需要填写脚本所在路径**。
Pre:
使用gitlab API 与jq 筛选器 查找信息的例子
Next:
Python2 转化 python3 遇到的问题记录
0
likes
761
Weibo
Wechat
Tencent Weibo
QQ Zone
RenRen
Submit
Sign in
to leave a comment.
No Leanote account?
Sign up now.
0
comments
More...
Table of content
No Leanote account? Sign up now.