Have you ever wanted to merge a bunch of text files together into one large one? For example, if you use a tool to go grab a bunch of show command results and output it to a text file per device, it's handy if you can have the operating system merge all that together for you. Many of you have likely done this at one point or another, but I figured it was worth capturing here to share the syntax.
So, if you are in a Windows command prompt, you can use the type command to output the contents of a file.
C:\>type text1.txt
This is a test.
Then you can use the type command plus the double arrows to merge a bunch of files:
C:\>type *.txt >> merge.txt
text1.txt
text2.txt
text3.txt
text4.txt
This leaves you with all the original files plus a new one called merge.txt. Piece of cake.
Recent comments
1 hour 57 min ago
12 hours 40 min ago
1 day 9 hours ago
2 days 10 hours ago
3 days 3 hours ago
3 days 7 hours ago
4 days 10 hours ago
1 week 11 hours ago
1 week 1 day ago
1 week 1 day ago