Page 1 of 1

Joining files with same part of the name

Posted: Thu Apr 04, 2013 10:00 pm
by sardaukar
Is it possible to join at once groups of files in different joined files separated according the same name-part of the group?

1name 1.txt
1name 2.txt
1name 3.txt

2name 1.txt
2name 2.txt
2name 3.txt

3name 1.txt
3name 2.txt

joined/merged in 1name.txt, 2name.txt and 3name.txt

Maybe is simple but I have no clue. I can do it with 'Add to footer' but takes a lot of time to add files according to chosen in 'Files to process'.

Re: Joining files with same part of the name?

Posted: Thu Apr 04, 2013 10:39 pm
by access1denied
Copy 1name*.* merged1.txt
Copy 2name*.* merged2.txt
Copy 2name*.* merged3.txt
I the copy command doesn't work, use xcopy.

What I am saying here is you don't need TP for such a simple task... Open up notepad and enter the above... Modify the above to include the path of the files... Save the notepad file with a .bat or .cmd (assuming you are using windows) extension.... The double click and wait...

Re: Joining files with same part of the name?

Posted: Fri Apr 05, 2013 2:30 am
by sardaukar
Thanks,

My scripting abilities are so low that I couldn't manage with the bat/cmd file. But even I could, still there will be use of TP for making the list of file names in txt/bat file.

Anyway thank you for the advice.

Re: Joining files with same part of the name

Posted: Sun Apr 14, 2013 1:25 am
by sardaukar
Like I thought solution is very easy. Input all files in File to Process.
Under Restrict to Name with search and replace remove the non-essential parts of the names and at the output choose append. So all files with same beginning part of the name will be appended in name of the same part.