The implementation method of uploading files to FTP directory with batch processing _dos/bat

Source: Internet
Author: User
Tags ftp rar

In order to quickly the project developed in the patch through FTP quickly uploaded to Linux, feeling every time with FLASHFXP and other tools trouble, wrote a simple batch processing, share with you.

Save the following code as a. bat format file, and each time the patch you want to upload is saved in the specified local directory, just double click to execute the file and upload it to your designated directory.

Description

192.168.1.1 FTP IP Address
21 Port
Username User Name
Password Password
Temp.txt Save FTP information temporary files, upload and delete
C:\Documents and settings\user\ desktop \patch\upload_dir\1.zip upload Zip files in upload_dir directory
Test/temp%date%.rar upload to the user directory and rename the uploaded file with "temp+ Current date"

Finally, delete the local file

Copy Code code as follows:

@echo off
echo Open 192.168.1.1 >> temp.txt
echo User username password>> temp.txt
Echo Bin >> Temp.txt
Echo put "C:\Documents and settings\user\ Desktop \patch\upload_dir\1.rar" "Test/temp%date%.rar" >> temp.txt
echo Bye >> temp.txt
Ftp-n-S: "Temp.txt"
del/q C:\Documents and Settings\user\ desktop \patch\upload_dir\1.rar
del/q Temp.txt
Pause

The above content is a small series to introduce the use of batch processing upload files to the FTP directory implementation method, I hope to help!

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.