Batch FTP upload file _dos/bat

Source: Internet
Author: User
Tags ftp upload file

Background: This machine a file "A.TXT" in the C packing directory, need to upload to the FTP server "192.168.0.1" under the "X" directory

Copy Code code as follows:

@echo off
Set Ftpfile=putfiles.ftp
Set Logfile=putfiles.log
echo Open 192.168.0.1 > "%ftpfile%"
REM Change the username and password in the line below to your username and password
echo User username password >> "%ftpfile%"
REM------------------------------
Echo bin >> "%ftpfile%"
REM enters the "X" directory in FTP server
echo CD x >> "%ftpfile%"//If the server has configured the FTP upload file rem echo cd x >> "%ftpfile%" comment on the line
REM------------------------------
REM enters the local C-packing directory
echo LCD c:\ >> "%ftpfile%"
REM------------------------------
Echo put A.TXT >> "%ftpfile%"
Echo quit >> "%ftpfile%"
echo-------------------------------->> "%logfile%"
date/t >> "%logfile%"
time/t >> "%logfile%"
echo-------------------------------->> "%logfile%"
Ftp-n < "%ftpfile%" >> "%logfile%"
Del "%ftpfile%"
@echo on
rem-----------Script End---------------

The above is a small series to introduce the batch processing FTP upload file problem, I hope to help you!

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.