Use ftp batch script (MS)

Source: Internet
Author: User
Tags file transfer protocol
FTP (file transfer protocol) is a file transfer utility commonly used with Unix systems.

FTP can use scripts (command list from external files ). The following example demonstrates a script that opens a connection with the IP address 11.11.11.11, logs on to the host using the password "guest" as the guest, uploads the file1 file, and then exits:

Open 11.11.11.11
User
Guest
Guest
Put file1
Quit

You must use-SOption, FTP can read the file in windows. If the previous script is in a file named test. scr, you can start it by typing the following:

FTP-S: Test. scr

You can specify the host name in the command line and use the script to log on. For example, if you use the following command line:

FTP-S: Test. scr 11.11.11.11

The script file should be as follows:

User
Guest
Guest

Put file1
Quit

However, if the FTP host performs automatic logon, this command will not run. To disable automatic logon, use-NSwitch:

FTP-n-s: Test. scr 11.11.11.11

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.