Combine the content of multiple text files with the DOS command

Source: Internet
Author: User

(1) first, use the method described in "batch change file names in sequence" in this book to rename these 100 text files by serial number;

(2) In the "command prompt" window, run the CD command to enter the folder where the novel file is located;

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

A little later, after opening the new book.txt file, we can see that the size of the new book.txt file is the total size of the more than 100 text files. The reading order is also generated in ascending order, so it is easy to read.

Last time look introduced how to use Word documents to merge text files. Today, look teaches you how to use the doscommand to quickly merge text files.

1. Copy all text files to the same folder, click Start> Run, And Enter cmd to open the Command Prompt window and switch to the location where the text files are stored, as shown in.

2. Enter "copy *. txt c: c.txt" (c: c.txt is the path for storing the target file and the merged file name), and press enter to run the command, as shown in.

3. In the pop-up "rewrite c: c.txt ?" Enter all, (all indicates all), and press enter to run, as shown in.

Now all text files under the drive letter are merged successfully. Now let's open "c: c.txt" and check 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.