Last active
December 22, 2015 23:39
-
-
Save NorihikoMoriyama/6548249 to your computer and use it in GitHub Desktop.
リモート・マシン間でファイルをコピーする
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd C:\Program Files\WinSCP | |
winscp.exe /console /script=C:\Users\***\winscp_fileup.txt | |
del C:\Users\***\images\*.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# バッチモードに設定し、確認/問い合わせを無効にする | |
option batch on | |
# ファイル上書きの確認などを無効にする | |
option confirm off | |
# サーバーに接続 | |
open [user]:[password]@[ip] | |
# リモートディレクトリを変更 | |
cd /var/www/html/***/images | |
# バイナリモードに変更 | |
option transfer binary | |
# ファイルをアップロード | |
put C:\Users\***\images\*.jpg | |
# ファイルをダウンロード | |
#get *.jpg C:\Users\***\images\ | |
# 切断 | |
close | |
# 終了 | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment