winscp

最後更新: 2016-11-08

介紹

 


Scripting

 

winscp.com /script=ftpscript.txt

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
close

# Exit WinSCP
exit

Remark

protocol: ftp, ftps ...

put test.txt

 


File Encryption

 

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

seamlessly:

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)

 

winscp.com /script=ftpscript.txt

ftpscript.txt

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

 


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

 


Resume Transfer

 

Options > Preferences > Endurance > "Enable transfer resume/transfer to temporary filename for"
Files above: 100 KB

If your transfer is interrupted, a partial file (with .filepart extension) remains in the target folder.
After you try to transfer the file a second time, WinSCP looks for the partial file.
If it finds a partial file, it offers you chance to resume the transfer.

For performance reasons transfer to temporary file name is enabled by default
  for files larger than a given threshold.(Default: 100 KB)

If you resume the transfer, WinSCP will skip a part of the source file equal to the target file 's size.
The program will only transfer the remainder.

 


 

 

 

 

Creative Commons license icon Creative Commons license icon