Command line option to compare two files

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
ejubenville
New Member
New Member
Posts: 1
Joined: 2005-12-03, 15:20 UTC

Command line option to compare two files

Post by *ejubenville »

I would like to trigger Total Commander's file differencing feature from a command line. Is there a plug-in that does that, or is it possible to write one that adds a command line option to trigger a comparson of two files?

Background: I use TortoiseCVS for source code management, and it provides a hook to use any third-party differencing tool, as long as that tool can accept both filenames and optional command arguments on its command-line. I know there are a lot of fine tools that do that (I like WinMerge), but some Total Commander loyalists have asked for a way to hook Total Commander in as the differencing tool.
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Re: Command line option to compare two files

Post by *Sheepdog »

ejubenville wrote:I would like to trigger Total Commander's file differencing feature from a command line. Is there a plug-in that does that, or is it possible to write one that adds a command line option to trigger a comparson of two files?
That would not be possible with TC standalone. Although there is a command that starts the internal file comparision tool: "cm_ComparFilesByContent" there is no way to pass any parameter to the internal commands.

So it may be possible to make an AutoHotkey Script that opens TC with those files, but I personally think it is not worthy to do so.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
majkinetor
Senior Member
Senior Member
Posts: 369
Joined: 2005-11-20, 10:36 UTC
Location: Belgrade, Serbia
Contact:

Post by *majkinetor »

I think TC should be upgraded with command line option
with syntax like
[face=courier] /x cmnd [cmnd]* (execute command)[/face]

which will execute command(s) on startup.

For instance

totalcmd ... /x cm_ComparFilesByContent

This should be last thing to do upon command line parsing and initialization of TC, so thing like this would be possible:

totalmcd /L=c: /R=d:\1 /x cm_selectallfiles cm_copyfiles

I am not trying to use existing commands just giving you an example.

Some of you may notice that some internal TC commands will not have its minimal working context for this, but some commands will have, and the one should be able to execute them in this manner.


I was always confused with decision of developer (or ignorance) to implement this feature. For instance, Opera should have it also so things like Opera.exe /x fullscreen would be possible. Since both Opera and TC have internal commands this would be possible, althoug Opera case is much complicated because commands have parameters while in TC this is not true, so it would be peace of cake to implement.

I think Ghsiler should consider this before implementing UCM model.
We are not doing this just for the money.
We are doing it for sh*t load of money.
 
 
r-moth.com
r-moth.deviantart.com
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

@ejubenville:
If you are interested in an AHK script/exe mentioned by Sheepdog, drop me a line, not a big deal to create one.

Icfu
This account is for sale
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

icfu wrote:not a big deal to create one.
:oops: So you can see again: what's a lot of work for one guy may sometimes be not a big deal to someone else. :oops:

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
majkinetor
Senior Member
Senior Member
Posts: 369
Joined: 2005-11-20, 10:36 UTC
Location: Belgrade, Serbia
Contact:

Post by *majkinetor »

I just tried AHK.

How I missed this til now...
We are not doing this just for the money.
We are doing it for sh*t load of money.
 
 
r-moth.com
r-moth.deviantart.com
Post Reply