General discussion


Batch File for grouping files

By barberd99 ·
Hi all, I need a batch file to take the text from seveal test*txt (* being a variable number)files and group it in one file result.text, but also add part of the file name (the variable number)to each line!
i.e. file 1 text354.txt and contains ROW,partno1,1,01/03/2010
file 2 text654.txt and contains ROW,partno2,7,01/03/2010

-so far I have got this
-@echo off>Group Files
-cd test\files
-for /r /d %%a in (.) do copy/b
test.txt+"test*.txt" test.txt

this copies across the lines but replicates them! what am i doing wrong and how do I get the file name variable into the result file on each line
i.e. result.txt
I would appreciate any help you can give on this please

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Related Discussions

Related Forums