Question Locked

type command in batch file

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am using the type command in a batch file i.e. type WN*N.txt >> Group\WNN.txt
The problem is the text is stuck together in the new file instead of on seperate lines in the original, any ideas please

5 replies

by barberd99

Thanks for the suggestions guys, unfortunately I am trying to 'type' from several files at once i.e. type WN*.txt >> WNN.txt and I cant get these methods to work in this instance, there are multiple files some with one line and others with multiple lines, any other ideas?

by 1bn0

copy file1.txt >> existingfile.txt
copy file2.txt >> existingfile.txt
copy file3.txt >> existingfile.txt
copy file4.txt >> existingfile.txt

>> tells the copy command to add the contents of the source file to the existing fiule instead of replacing it.

> just telss copy to overwrite the existing file.

This discussion is closed to new replies.