Uploading a download file to an FTP server using a batch file

Source: Internet
Author: User

1. from files under the root folder of the FTP server to the specified folder

Format: ftp-s:[configuration file] [FTP address]

such as: Ftp-s:c:\vc\ftpconfig.txt 192.168.1.1

Create a batch file: named Test.bat (name can be casually, for easy operation, directly named 1.bat) and then copy the above contents

Ftpconfig.txt's file content is:

TestUser
Test
Get Test.exe C:\ftptest\testdownload.exe
Bye

Explain:

The first two commands are fixed and are user names and passwords.

Get test.exe C:\ftptest\testdownload.exe Download the Test.exe file under the FTP Server root folder to the local C:\ftptest\ directory with the file name Testdownload.exe

Quit quitting

Execute the established batch file, and you will see that the file is automatically downloaded to the file you specified.

2, from the FTP server specified file Plus, download files to the specified folder

Format: ftp-s:[configuration file] [FTP address]

such as: Ftp-s:c:\vc\ftpconfig.txt 192.168.1.1

Create a batch file: name Test.bat and copy the above contents

Ftpconfig.txt's file content is:

TestUser
Test
CD test

Get Test.exe C:\ftptest\testdownload.exe
Bye

Explain:

The first two commands are fixed and are user names and passwords.

CD Open Folder

Get test.exe C:\ftptest\testdownload.exe Download the Test.exe file under the FTP server folder to the local C:\ftptest\ directory with the file name Testdownload.exe

Quit quitting

3. Upload files to the FTP server root directory

Format: ftp-s:[configuration file] [FTP address]

such as: Ftp-s:c:\vc\ftpconfig.txt 192.168.1.1

Create a batch file: name Test.bat and copy the above contents

Ftpconfig.txt's file content is:

TestUser
Test

Put C:\ftptest\testdownload.exe Test.exe

Bye

Explain:

The first two commands are fixed and are user names and passwords.

CD Open Folder

Put C:\ftptest\testdownload.exe test.exe upload the local C:\ftptest\testdownload.exe file to the FTP server named Test.exe

Quit quitting

4, upload files to the FTP server root specified directory

Format: ftp-s:[configuration file] [FTP address]

such as: Ftp-s:c:\vc\ftpconfig.txt 192.168.1.1

Create a batch file: name Test.bat and copy the above contents

Ftpconfig.txt's file content is:

TestUser
Test

CD test

Put C:\ftptest\testdownload.exe Test.exe

Bye

Explain:

The first two commands are fixed and are user names and passwords.

CD Open Folder

Put C:\ftptest\testdownload.exe test.exe upload the local C:\ftptest\testdownload.exe file to the test folder on the FTP server named Test.exe

Quit quitting

Uploading a download file to an FTP server using a batch 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.