Using DOS commands to merge the contents of multiple text files _dos/bat

Source: Internet
Author: User

(1) First of all, the use of the book "Batch in order to change the filename" to introduce the method of the 100 or more text files are renamed by ordinal;

(2) in the Command Prompt window, use the CD command to enter the folder where the novel file resides;

(3) Enter the "Copy *.txt book.txt" command and press ENTER to execute.

Later, when you open the folder where the novel files are located, you can see that the newly generated book.txt file size is the sum of the 100 text file sizes, and that the reading order is just as ascending, so it is easy to read.

The last look describes the use of Word documents to merge text files, and today look teaches you to use DOS commands to quickly merge text files.

1. Copy all text documents to the same folder, click start → run, enter cmd to open a command prompt window, and switch to a text file location, as shown in the following illustration.

2. Enter the "Copy *.txt C:c.txt" (C:c.txt the path to the destination file and the merged file name), and return to run the command, as shown in the following figure.

3. In the pop-up "rewrite C:c.txt?" "Enter all and (all) the carriage return runs, as shown in the following illustration.

Now all the text files under the E-Drive are merged successfully. Now we open "c:c.txt" and look at the effect.

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.