Request: combine arbitrary files

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
marekjed
Junior Member
Junior Member
Posts: 25
Joined: 2003-10-16, 18:09 UTC

Request: combine arbitrary files

Post by *marekjed »

Total Commander has the Split and Combine functions, but they only work in tandem, i.e. the Combine function only accepts the set of files created by TC's own Split.

I often need to combine large numbers of arbitrary text files (because I can then extract data from them more easily than from hundreds of individual files). I once used a shell extension that provided that functionality, but can no longer find it.

Currently, TC displays an error message when Combine is invoked on arbitrary files. Perhaps this function could be modified to optionally combine all selected files, in the order in which they are listed (maybe with a warning, for those used to the way the feature has always worked). Could this be added to TC, please?

No more requests today, and thanks a lot again!
.marek

On edit: Perhaps this could be implemented as a special case of the Copy function: select files to combine, press F5, then provide a single filename in the dialog box as target. I hoped this would actually work already, but in this case TC displays an error message: You cannot move or copy more than one file to a single file. Perhaps instead of the error, TC could ask if the user really wants to combine the files - this might be a better solution than modifying the well-known behavior of Combine. Either way would be perfect for me, as long as I can combine files that TC did not originally split.
No ads, no nags freeware: http://www.tranglos.com
(KeyNote, PhoneDeck, KookieJar, Oubliette)
User avatar
eugensyl
Power Member
Power Member
Posts: 564
Joined: 2004-06-03, 18:27 UTC
Location: România
Contact:

Re: Request: combine arbitrary files

Post by *eugensyl »

My Best Wishes,

Eugen
User avatar
marekjed
Junior Member
Junior Member
Posts: 25
Joined: 2003-10-16, 18:09 UTC

Re: Request: combine arbitrary files

Post by *marekjed »

eugensyl wrote:Try THIS.
Thanks, Eugen, but this isn't what I need. It takes all the files from a folder (can't select specific files), accepts only the extensions the author built in (can't type your own) and doesn't provide for specifying order.

I could write something myself in Delphi pretty easily, and I now see there are plenty split/join apps for example here: http://www.filedudes.com/files/Split_Combine1.html (some more expensive than TC!). My point is that when a feature like this is built into TC, it is instantly much more flexible, because it uses all the power of the file list, including sorting, filtering, source and target folders etc. Most join programs require that you manually add files to them, while in TC it would be a single-click operation - much smoother and much more powerful.

.marek

ed: typos
No ads, no nags freeware: http://www.tranglos.com
(KeyNote, PhoneDeck, KookieJar, Oubliette)
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

Why not to make a toolbutton for this. You can pass to this tool the source path, target path, filelist etc. You can use any tool (that can take filelist parameter)..
User avatar
marekjed
Junior Member
Junior Member
Posts: 25
Joined: 2003-10-16, 18:09 UTC

Post by *marekjed »

Alextp wrote:Why not to make a toolbutton for this. You can pass to this tool the source path, target path, filelist etc. You can use any tool (that can take filelist parameter)..
It's worth a try, but I don't think Windows command line will correctly handle hundreds of files with long pathnames. IIRC there has always been a limit on the commandline buffer size, and not too large at that. I'd have to check what XP does in this regard.

.marek
No ads, no nags freeware: http://www.tranglos.com
(KeyNote, PhoneDeck, KookieJar, Oubliette)
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2marekjed
Yes, right, there is a limit. You can still use the filelist: text file containing names of selected files.
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

marekjed,
TC Help File wrote:Combine files

This function allows to combine multiple files to one big file. Total Commander can not only combine files created with its own function split file, but also files created with the Unix command split -b. Put the cursor on the first partial file and choose 'combine files'. The file names must be numbered in ascending order, or have letters in ascending order. Total Commander will detect file.001, file.002, file.003, but also fileaa, fileab, fileac etc.
HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
van Dusen
Power Member
Power Member
Posts: 684
Joined: 2004-09-16, 19:30 UTC
Location: Sinzig (Rhein), Germany

Post by *van Dusen »

Create a button with:

Code: Select all

Command   : %ComSpec% /c
Parameters: For /F %%f IN (%l) DO Type %%f >>%t\Combined.out
This will combine the selected files from the source panel to the file "Combined.out" in the target path.
User avatar
solid
Power Member
Power Member
Posts: 755
Joined: 2004-08-09, 11:20 UTC

Post by *solid »

Select the files you want to combine, press F5 and in the dilaog box write a filename.* instead of *.*

TC will start copying and on secoond will ask you what to do, because file exists. Just select Append.

Unfortunately, TC stops and asks for each file, and i do not see Append to all function, so you will have to click Append on each file.
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

2van Dusen
Small addition: Maybe an additional DEL command would be useful, to prevent adding data to an already existing file:

Code: Select all

Command   : %ComSpec% /c
Parameters: IF EXIST %t\Combined.out DEL %t\Combined.out&For /F %%f IN (%l) DO Type %%f >>%t\Combined.out
(untested)
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
Post Reply