Page 1 of 1

There's no way for: copy file1 + file2 + fileN targetFile

Posted: 2010-12-11, 15:25 UTC
by miroslav.vrlik
Scenario: In log file analysis process I often need concatenating several log files (e.g. from several days) into one file.
MS-DOS: copy file1 + file2 + file3 + ... + fileN targetFile

In TC, three possible approaches fail:
(1) "Combine Files" requires exact filenames
(2) copying files to one filename throws "You cannot move or copy more than one file to a single file!"
(3) copying a file to existing filename is missing "Append" option at Overwrite options

I think TC could enable at least one way to concatenate files.
Thanks!

Miroslav

P.S. there's also a pool at ghisler.ch/board/viewtopic.php?t=28059 where you can vote for way most intuitive for you to achieve concatenation (sorry for non-clickable link but forum won't let post me true URL)

Posted: 2010-12-11, 17:11 UTC
by Hacker
Hello miroslav.vrlik,
The MS-DOS way should work fine. Apart from that, Append should be accessible in the overwrite dialog if you do not use the "Standard" copy method but the "Default" one.

HTH
Roman

Re: There's no way for: copy file1 + file2 + fileN targetFi

Posted: 2010-12-11, 21:38 UTC
by nsp
If you have ansi names and use text files, and You can use TCBL/or Balderstrom script for This !

TCBL Sample
pgm : <path to>\tcbl.exe
param: %L del %T\Target.log $( TYPE $f >> %T\Target.log

THis will do the job if your files are in the good order !

Posted: 2010-12-12, 00:46 UTC
by Balderstrom
I forgot about that script, here's an updated MergeFiles.cmd.