Merge .txt files
Solved
Narayan
-
brucine Posted messages 24866 Registration date Status Member Last intervention -
brucine Posted messages 24866 Registration date Status Member Last intervention -
Hello,
I would like to know if there is a command (included in a batch) to merge .txt (or other) files into a single file.
Thank you
Narayan
I would like to know if there is a command (included in a batch) to merge .txt (or other) files into a single file.
Thank you
Narayan
10 answers
-
The simplest way to merge the contents of two ASCII text files:
File1.txt
File2.txt
type *.txt >> file.res
ren file.res file.txt
I’m posting this here because every time I need it, I search for this tip and can't find it anywhere!
But I allow others to read this message, I'm not a rat ;-)
Galinette-
-
Apparently you are practicing copy syntax, but still not how to say Hello.
Obviously your second syntax will work because we didn’t select all files (*), only those starting with 23 (but not 23.txt), and we are not concatenating into a directory but into a file.
If we apply a syntax like type *.txt>>test.txt while the file test.txt already exists, we will have an additional problem...
-