最後更新: 2016-11-08



Scripting /script=ftpscript.txt


# Connect
open ftp://User:PW@Host/

# Change the remote directory
cd MyFolder/

# Upload the file to current working directory
# Folder 要加 '/' 在尾
# 當 file 在 local 時, 不會問就會 overwrite
get test.txt c:\test\

# 沒有 Disconnect 及 Exit 時, 它就會仍然在 shell
# Disconnect

# Exit WinSCP


protocol: ftp, ftps ...

put test.txt


File Encryption


WinSCP can seamlessly encrypt your files on an SFTP server using AES-256 CTR encryption.


anyone else, who does not know the key, including a server Administrator, will see only gibberish.

Requirements on Server File System

Filename Encryption

Encryption of file names uses Base64 encoding.

To preserve file names encoded in Base64 encoding, the target file system should be case-sensitive

File Content

Fixed file header aesctr.......... is written to the output file.

16 bytes (128 bits) of salt is generated and written to the output file.

Empty files are encoded as empty files (no header nor salt).


ftps(TLS) /script=ftpscript.txt


open -explicit -passive=on ftps://u:pw@host:port
lcd C:\Temp
put test.txt


Useful Opts


confirm     off|on                          # Default: off

Toggles confirmations (overwrite, etc.).

Commands affected: get, put

reconnecttime     off | <sec>      # Default: off


Winscp Usage


WinSCP will search down the list from the top until it finds an algorithm supported by the server, and then use that.

If the algorithm WinSCP finds is below the warn below here line, you will see a warning box when you make the connection

Get two warnings similar to the one above, possibly with different encryptions.

In SSH-2, the encryption algorithm is negotiated independently for each direction of the connection,

although WinSCP does not support separate configuration of the preference orders.

 * Winscp 不支援指定用那 Encryption type, 比如指定用 arcfour