Page 1 of 1

Compare two files from command line

Posted: 12 Jan 2009 13:12
by DVV
Does HxD have such command-line switch which would allow to compare two files? I.e. can I compare two files using something similar to the following? -

HxD.exe /cmp "file 1" "file 2"

If not, can it be a feature request?

Re: Compare two files from command line

Posted: 12 Jan 2009 13:59
by Maël
Currently, there is no such feature. How would the output look like?

Re: Compare two files from command line

Posted: 13 Jan 2009 12:49
by Guest
Maël wrote:Currently, there is no such feature. How would the output look like?
Originally, I assumed it could work in the same manner as HxD's menu item Analysis -> File-compare -> Compare... works.
I.e. I meant that when you start HxD from command line with the following parameters:

HxD.exe /cmp "file 1" "file 2"

it shows HxD's window with the files "file 1" and "file 2" opened one under another (as the Compare... does) and selects first non-matched byte.

Re: Compare two files from command line

Posted: 21 Jan 2009 06:34
by guest
I'm a different guest, and I'd like to second this idea. It would be very useful to me to be able to provide two files from the command line and have HxD open both and start the compare function.

Thanks!

Re: Compare two files from command line

Posted: 21 Jan 2009 23:37
by Maël
Ok, on TODO-list.

Re: Compare two files from command line

Posted: 17 Sep 2009 18:25
by beattidp
Still watching anxiously for this feature.

Basically, invoke 2 file names with a "-diff" parameter flag,
send them to the file comparison routine.

- Ability to parse command-line flags ?
- Ability to parse command-line file name ?
- Diff/comparison functionality exists ?

Sounds like about 10 to 15 lines of program code to add that in, but
now 9 months later we still haven't seen it; must have been more difficult
than we thought.

Re: Compare two files from command line

Posted: 02 Nov 2009 08:38
by Dwedit
Windows has a binary comparison tool built in, invoke it with "FC /B file1.bin file2.bin"

Starting File Comparison from Command Line

Posted: 28 Sep 2010 08:43
by kapkrunch
Thanks for a fantastic program!!! Is there a command line option to start HxD in file compare mode?

Re: Starting File Comparison from Command Line

Posted: 29 Sep 2010 18:10
by Maël
Thanks for your feedback. Merged with another feature request similar to yours (see above).