1.

Solve : Append the contents of one text file to the end of another text file.?

Answer»

How do I append the contents of one text file to the end of another text file?

I have two text files, A.txt and B.txt. I want to append the contents of B.txt to the end of A.txt.

NOTE: I have SEARCH the word "append" but apparently there is a APPEND command some how similar to the PATH command. This is not what I am looking for.


Microsoft Windows XP [Version 5.1.2600]Also,

Help files indicate the COPY command will append my files together with the "+" function. I have had no success with this command either.

COPY A.txt + B.txt A.txt
COPY A.txt B.txt + A.txt
COPY A.txt + B.txt

Also, I am doing this in a batch file. Perhaps this makes a difference.

Tim CNew Information

I have been able to perform the APPEND at the DOS command line but not within the batch file.

TYPE B.TXT>>A.TXT should append b.txt to a.txt (caps are for emphasis only)

Copy a.txt+b.txt REQUIRES a new OUTPUT file, a file cannot be copied ONTO itself.
e.g. copy a.txt+b.txt c.txt (c.txt would contain the appended files.)

This is not a recognized use for the Append command, enter Append/? at the Command Prompt to check the syntax.

Good luckDusty,

Thank you. The TYPE command works.

Tim Thanks for coming back to report your success.. Another winner..

Would a perl script to combine multiple files work faster? I have to combine 4 files that are at least a gig into one file.Quote from: jdd on January 06, 2009, 09:11:42 AM

Would a perl script to combine multiple files work faster? I have to combine 4 files that are at least a gig into one file.

I shouldn't think so. It's just a different way of manipulating the filesystem.


Discussion

No Comment Found