Compare two files from command line

Wishlists for new functionality and features.
Post Reply
DVV
Posts: 14
Joined: 17 Jan 2008 11:24

Compare two files from command line

Post 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?
Maël
Site Admin
Posts: 1455
Joined: 12 Mar 2005 14:15

Re: Compare two files from command line

Post by Maël »

Currently, there is no such feature. How would the output look like?
Guest

Re: Compare two files from command line

Post 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.
guest

Re: Compare two files from command line

Post 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!
Maël
Site Admin
Posts: 1455
Joined: 12 Mar 2005 14:15

Re: Compare two files from command line

Post by Maël »

Ok, on TODO-list.
beattidp
Posts: 1
Joined: 17 Sep 2009 18:16

Re: Compare two files from command line

Post 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.
Dwedit
Posts: 2
Joined: 02 Nov 2009 08:27

Re: Compare two files from command line

Post by Dwedit »

Windows has a binary comparison tool built in, invoke it with "FC /B file1.bin file2.bin"
kapkrunch
Posts: 1
Joined: 28 Sep 2010 08:35

Starting File Comparison from Command Line

Post by kapkrunch »

Thanks for a fantastic program!!! Is there a command line option to start HxD in file compare mode?
Maël
Site Admin
Posts: 1455
Joined: 12 Mar 2005 14:15

Re: Starting File Comparison from Command Line

Post by Maël »

Thanks for your feedback. Merged with another feature request similar to yours (see above).
Post Reply