It is the simplest method to merge text files with BAT in batches.

Source: Internet
Author: User

 

Bat content:

For/R % I in (*. txt) do copy "D: \ total.txt"/A + "% I"/a "D: \ total.txt"

 

Save the preceding code as a ". Bat" file and double-click it in the directory of the file to be merged. The merged file is D: \ total.txt. First, create an empty total.txt.

For/R % I in (*. txt) do copy "D: \ total.txt"/A + "% I"/a "D: \ total.txt"
Target file of the object set

 

Obviously, "d: \ kkk.txt" indicates the target file, and "% I" indicates every file in (*. txt). The front and back positions of the two cannot be exchanged. /A indicates that it is in the text format, and binary is/B.

 

Mainly, only text files can be merged. Files with file headers, such as BMP and MP3, cannot be merged.

Original article: http://blog.csdn.net/darkread/article/details/7108235

It is the simplest method to merge text files with BAT in batches.

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.