WINSCP software synchronizes a directory of local or remote FTP

Source: Internet
Author: User
Tags ftp ftp commands ssh file transfer protocol secure copy


Characteristics

• Graphical user interface
• Multi-lingual
• Perfect integration with Windows (drag, URL, shortcut)
• Support for all common file operations
• Support for SFTP and SCP protocols based on SSH-1, SSH-2
• Support Batch scripts and command-line methods
• A variety of semi-automatic, automatic directory synchronization mode
• Built-in text editor
• Support for SSH password, keyboard interaction, public key, and Kerberos (GSS) authentication
• Support for various types of public key authentication through integration with pageant (PuTTY Agent)
• Provides Windows Explorer and Norton Commander interface
• Optionally store session information
• The settings are available in the configuration file rather than in the registry and are suitable for operation on mobile media


WinSCP can perform all basic file operations, such as downloading and uploading. Also allows renaming of files and directories, changing attributes, establishing symbolic links, and shortcuts.

Two optional interfaces allow users to manage remote or local files.

Connecting to a remote computer

Using WinSCP, you can connect to a SSH (secure Shell) server that provides SFTP (SSH File Transfer Protocol) or SCP (secure Copy Protocol) service, typically a UNIX server. The SFTP is included in the SSH-2 package, and the SCP is in the SSH-1 package. Both protocols can be run on a later version of SSH. WinSCP also supports SSH-1 and SSH-2. However, WINSCP does not support coding options, that is, you use WINSCP to connect to a Linux machine under Windows, because Linux and Windows default encoding is different, so you can not access the above Chinese files or folders (will see garbled). One workaround is to set "UTF-8 encoding for filenames" to on in the Advanced options–environment when the WINSCP is opened.

Check to add to system path during installation.
Sometimes we will remote FTP files synchronized to the local, by running the program we write to the file for a system operation, will produce some output files, and then the processed files synchronized to the remote FTP.
For the remote files in the above synchronization to the local or local file synchronization to remote FTP, we can use the WINSCP software to execute a series of FTP commands. WINSCP software can be downloaded online.
Example of a WINSCP command:
The code is as follows Copy Code
# Winscp.exe/console/script=sample.txt
# automatically answer all prompts negatively not to stall
# The script on errors
# option Echo On|off
Option echo off
# option Batch On|off|abort|continue
Option Batch On
# option Confirm On|off
Option confirm off
# option Transfer binary|ascii|automatic
# option Synchdelete On|off
# option Exclude Clear | <mask>[;<mask2> ...]
# option include Clear | <mask>[;<mask2> ...]
# Open [sftp|ftp|scp://] [<user> [:p assword] @] # Open User:password@example.com
# Connect FTP Address
Open ftp:// username: password @ftp.chenpeng.info:21
# Change Remote Directory
# Cd/home/user If you sync to remote FTP, you can use this command to go to a remote directory.
# change Local Directory
# set to Self ' s working dir sets the local file directory that needs to be synchronized to remote FTP
LCD D:TEMPTEST_FTP
# Force Binary Mode transfer
Option Transfer Binary
# Download file to the local directory D:
# get Examplefile.txt D:
# option Synchdelete On|off
Option Synchdelete off
# option include Clear | <mask>[;<mask2> ...]
# option include/2008-*-*/;/2009-*-*/;/2010-*-*/;/2011-*-*/;/2012-*-*/;/2013-*-*/
# synchronize Local|remote|both [<local directory> [<remote directory>]] from remote sync to local locally; from local sync to remote Sqlremote
Synchronize Local
# Disconnect
Close
# Exit WinSCP
Exit
Save the above script as a sample.txt file, and then perform a file synchronization operation through the Winscp.exe/console/script=sample.txt command.
We can usually write this command to a batch. bat file, the Local. Ext program written by the user who will be running will also write to the batch file, then put it in the Control Panel-> scheduled task, so that the program can be executed periodically, without requiring the user to repeatedly fetch files from the remote, execute the program, and upload it to the remote operation.
Have encountered a problem: the client provided FTP account, is the ASCII code read, resulting in the use of WINSCP software is not connected?
Solution: Open the WINSCP software, create the login point, click "Connection", the check box in the red circle tick, click "Save".
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.