* コマンドラインからの実行 [#va0890c1]

** ログインとlsコマンド実行 [#u8d65f5b]
 WinSCP.com /command "open mysess1" "ls tmp" "exit"

** ダウンロード [#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

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS