- 追加された行はこの色です。
- 削除された行はこの色です。
* コマンドラインからの実行 [#va0890c1]
** ログを取る [#e23ca1a1]
WinSCP.exe /log="%USERPROFILE\winscp.log.txt"
** ログインとlsコマンド実行 [#u8d65f5b]
WinSCP.com /command "open mysess1" "ls tmp" "exit"
** ファイルダウンロード [#ic66d370]
** ダウンロード [#ic66d370]
*** CUIのWinSCP.comで実行 [#v595c1d8]
WinSCP.com "MyWeb/host01" /command "lcd %USERPROFILE%\tmp" "get /var/www/test.html" "exit"
WinSCP.com /command "open MyWeb/host01" "lcd %USERPROFILE%\tmp" "get /var/www/test.html" "exit"
*** 上のコマンドをGUIのWinSCP.exeを起動して実行するには [#iebb31ab]
WinSCP.exe" sftp://"MyWeb/host01"/var/www/test.html
** アップロード [#ndee20f6]
WinSCP.com /command "open mysess1" "lcd %USERPROFILE%\tmp" " cd tmp" "put *.txt" "exit"
** ログを取る [#e23ca1a1]
WinSCP.exe /log="%USERPROFILE\winscp.log.txt"
** Synchronize [#yf506eda]
WinSCP.exe" "MyWeb/host01" /synchronize myweb-files /var/www
ローカルのmyweb-filesディレクトリでリモートの/var/wwwディレクトリと同期する(ファイル転送の方向はローカル→リモート)。
** 参考 [#ec3508ac]
- コマンドライン: http://winscp.net/eng/docs/commandline
- コマンド: http://winscp.net/eng/docs/scripting#commands