I'm a novice to windows batch - I want to concatenate multiple text files into one using windows batch. The files to be combined are specified in a list and could be dynamic. I have a single directory of files a.txt, b.txt, c.txt .... z.txt. I need to concatenate a subset of them into a merged.txt For example if list is the input list
set list=a f z
Then I want the merged.txt to have contents of a.text, f.txt and z.txt. Ideas I have already tried are
1)type *.txt > merged.txt :- wont work for me as that would combine all text files.
2)copy a.txt+f.txt+z.txt merged.txt :-But that would only combine just for this one input.
Does anyone have any ideas ?