Psftp automatically log on to the SFTP server, batch automatic upload upload download the specified file

Source: Internet
Author: User

1.putty Official Download

Http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Download the installation versionputty-0.67-installer.msi

2. After the installation is complete, open the Putty installation directory, locate the PSFTP.EXE, and copy to the new folder D:/download

3. Double-click Open Pstftp.exe, connect to Linux Server

4. Set up a local directory to download to Windows

5.psftp common commands (files on the operation server are common commands for Linux)

    • lcd+ path: Change the current directory of the Local machine
    • LPWD: View the directory where the local machine is currently located
    • ! dir: List files for the current directory of the Local machine
    • put+ local file: Upload local file to remote server (Mput upload multiple files)
    • get+ remote files: Download remote files to local machine (mget download multiple files)

6. Write Automatic batch files

    • Upload BAT file Upload_start.bat

psftp-l ROOT-PW xl2561216-b upload_cmd.txt

Exit

    • Upload the specified directory file upload_cmd.txt

Open 192.168.154.81

Cd/upload_winprofiles
Mput-r upload/*
Bye

    • Download BAT file Download_start.bat

psftp-l ROOT-PW xl2561216-b download_cmd.txt

Exit

    • Download the specified directory file download_cmd.txt

Open 192.168.154.81

Cd/download_linuxprofiles
Mget-r/download_linuxprofiles
Bye

Just click on the bat file to upload the download

Psftp automatically log on to the SFTP server, batch automatic upload upload download the specified file

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.