在Win 10建一個批次檔(a.bat)用winscp去上傳檔案,linux密碼有特殊字元(/)要urlencode成(%2F),但windows批次檔的(%)是跳脫字元,所以要用二個%代替,其它特殊字元比照辦理
原密碼:pass/word
批次檔密碼寫法:pass%%2Fword
EX:
winscp.exe /console /command "option batch abort" "option batch on" "option confirm off" "open sftp://user:pass%%2fword@my.ftp.host" "cd /var/www/html" "put *.xml" "exit"