Page 1 of 1

Concatenate files.

Posted: 26 Jan 2011 21:32
by timhatz
I have a process that that generates a daily file for me. And I would like a quick and simple way to select a handful of these daily files and concatenate them into one file, however leaving the original file alone.

Basicaly a join command over multiple files and preferable in the order I select them.

Thanks, Tim

Re: Concatenate files.

Posted: 26 Jan 2011 22:08
by xman
Probably not possible currently, but here is what you can do:
1) using batch rename, add to each of the files an extension *.001, *.002, *.003 etc.; use this pattern to do that:

Code: Select all

*.?.<#001> /e
2) use the following freeware tool to join them: http://www.jaist.ac.jp/~hoangle/filesj/
3) strip the extension of the original files (using command Set Extension and entering an empty string), so that you restore the original names

All of the above could be incorporated into a single script. Still, it would be nice, if this functionality was incorporated in XY.

Re: Concatenate files.

Posted: 26 Jan 2011 22:17
by zer0
timhatz wrote:I have a process that that generates a daily file for me. And I would like a quick and simple way to select a handful of these daily files and concatenate them into one file, however leaving the original file alone.

Basicaly a join command over multiple files and preferable in the order I select them.
First of all, what kind of a file is it? Scripting has functions for reading and writing files, so it may be possible.

Re: Concatenate files.

Posted: 27 Jan 2011 00:26
by timhatz
These are simple text files, I was assuming I could iter through a list using a script and write with the append option, not sure how at this time.

But just wanted to make sure that the functionality didn't already exist.

Thanks, Tim

Re: Concatenate files.

Posted: 27 Jan 2011 08:12
by Stefan
Hi Tim,
timhatz wrote:I have a process that that generates a daily file for me. And I would like a quick and simple way to select a handful of these daily files and concatenate them into one file, however leaving the original file alone.

Basicaly a join command over multiple files and preferable in the order I select them.

Thanks, Tim
please see if this script will aid you > Script Request - Text-merging Tool
If you have questions or improvement wishes for this script... please use this other thread to ask.