bat script to achieve FTP automatic download and upload sample code _DOS/BAT_ script home

bat script to implement FTP automatic download and upload example code

Updated: August 17, 2023 09:01:30 Author: Direct_
This paper mainly introduces the example code of bat script to achieve FTP automatic download and upload. By setting the corresponding commands and parameters, you can automatically backup or update the website content regularly to improve work efficiency. If you are interested, you can learn about it

1. Automatic download

# Example: Implement automatic download @echo Off echo open 192.168.137.102>>ftp.txt echo admin>>ftp.txt echo admin12345>>ftp.txt echo lcd D:\>>ftp.txt echo cd /admin/1>>ftp.txt echo bin>>ftp.txt echo get 11>>ftp.txt echo bye>>ftp.txt ftp -s:ftp.txt

Or use the following format

txt file open 192.168.137.102 admin admin12345 prompt off lcd D:\ cd /admin/1 bin mget 11 bye quit@echo off ftp -s:C:\Users\Dxx\Desktop\ftp.txt

2. Automatic upload

@echo off
echo open 192.168.137.102>>ftpPut.txt
echo admin>>ftpPut.txt
echo admin12345>>ftpPut.txt
echo lcd D:\ftp>>ftpPut.txt
echo cd admin/1>>ftpPut.txt
echo prompt off>>ftpPut.txt
echo put 12.txt>>ftpPut.txt
echo bye>>ftpPut.txt
echo quit>>ftpPut.txt
ftp -s:ftpPut.txt

To this article about the bat script to achieve FTP automatic download and upload sample code is introduced to this article, more related bat FTP automatic download and upload content please search the script home previous articles or continue to browse the following related articles hope that you will support the script home in the future!

Related article

Latest comments