Batch file 如何从批处理文件执行WinSCP命令
我想知道是否有一种方法可以从批处理文件中运行WinSCP命令,如Batch file 如何从批处理文件执行WinSCP命令,batch-file,command-line,sftp,winscp,Batch File,Command Line,Sftp,Winscp,我想知道是否有一种方法可以从批处理文件中运行WinSCP命令,如open sftp…,而不必在WinSCP打开后输入命令 以下是我想要发生的事情: 我创建了一个批处理文件(比如demo.bat),用于打开WinSCP命令行 我在demo.bat中插入WinSCP命令(open,get,put,等等) 批处理文件demo.bat打开WinSCP命令行并自动执行命令(get,put,等等) 使用 有一个 使用/command开关的简单批处理文件如下所示: WinSCP.com ^ /log="C
open sftp…
,而不必在WinSCP打开后输入命令
以下是我想要发生的事情:
demo.bat
),用于打开WinSCP命令行demo.bat
中插入WinSCP命令(open
,get
,put
,等等)demo.bat
打开WinSCP命令行并自动执行命令(get
,put
,等等)李>
使用
有一个
使用/command
开关的简单批处理文件如下所示:
WinSCP.com ^
/log="C:\writable\path\to\log\WinSCP.log" /ini=nul ^
/command ^
"open sftp://username:password@example.com/" ^
"put C:\local\path\file.txt /remote/path/" ^
"exit"
WinSCP GUI实际上甚至可以:
WinSCP甚至可以选择为您创建这样的批处理文件: