commandline and binary files
commandline and binary files
Hi there,
I want to exclude binary files from a comparison (or from the comparison result)
I there a command line option to exclude binary files fomr a comparison or comparison result ?
Also second question: on the GUI I get a notification when comparing binaries.
Is there a commandline option to detect that this would result in a binary diff and abort ?
there are some settings in the config file (e.g. Binary=0) so it must be possible somehow...
thanks,
Bernhard.
I want to exclude binary files from a comparison (or from the comparison result)
I there a command line option to exclude binary files fomr a comparison or comparison result ?
Also second question: on the GUI I get a notification when comparing binaries.
Is there a commandline option to detect that this would result in a binary diff and abort ?
there are some settings in the config file (e.g. Binary=0) so it must be possible somehow...
thanks,
Bernhard.
Re: commandline and binary files
If you are talking about directory comparison, then no, you can't exclude binary files (unless you know their extension, then you can add them to the exclude filer).I want to exclude binary files from a comparison (or from the comparison result) I there a command line option to exclude binary files fomr a comparison or comparison result ?
I'm not sure what you mean by "result in a binary diff and abort".Also second question: on the GUI I get a notification when comparing binaries. Is there a commandline option to detect that this would result in a binary diff and abort ?
psguru
PrestoSoft
PrestoSoft
Re: commandline and binary files
I would like to detect if it is a binary comparison and then cancel this or just report as "binary files differ".psguru wrote: I'm not sure what you mean by "result in a binary diff and abort".
Thats all. On the GUI this is working (a separate dialog comes up and i can cancel).
On the commandline i am unable to detect this and specify this behaviour.
Can you please add a corresponding option ? I think internally there is one in the config file but not on the command line.
As I reported in another post, this leads to serious problems (examdiff.com crashed) when you try to compare directories with files that are binaries. I do not know all the binary extensions in advance unfortunately.
hope this explains my problems...
thanks,
Berni.
Re: commandline and binary files
The same option controls both GUI and command line output: Options | Misc | Messages | "Message about different binary files". When it's checked, the following output happens:I would like to detect if it is a binary comparison and then cancel this or just report as "binary files differ".
Thats all. On the GUI this is working (a separate dialog comes up and i can cancel).
On the commandline i am unable to detect this and specify this behaviour.
Can you please add a corresponding option ? I think internally there is one in the config file but not on the command line.
Code: Select all
C:\ExamDiff>examdiff "C:\Test\Bin 1\Control.dll" "C:\Test\Bin 2\Control.dll" /o:-
Different binary files: C:\Test\Bin 1\Control.dll, C:\Test\Bin 2\Control.dll
I don't believe this is still a problem. Our users (including myself) routinely compare directories that contain binary files.As I reported in another post, this leads to serious problems (examdiff.com crashed) when you try to compare directories with files that are binaries. I do not know all the binary extensions in advance unfortunately.
psguru
PrestoSoft
PrestoSoft
Re: commandline and binary files
but not when comparing directories.psguru wrote: The same option controls both GUI and command line output: Options | Misc | Messages | "Message about different binary files". When it's checked, the following output happens:
when comparing with your approach have to know in _advance_ if its binary or not,
because I have _always_ /html on the command line when comparing.
Or I have to do this in _two_ steps and repeat the process, first without /html to find out
whether binary or not, and then in the second step with /html for those files which are not binary.
you see my point ? or am i missing something ?
thanks, Bernhard.
Re: commandline and binary files
I'm afraid I don't. What exactly is your command line? What kind of problems are you getting when you are using it?
psguru
PrestoSoft
PrestoSoft
Re: commandline and binary files
Looks like I didn't see your other post:
Let me look into this.when i run examdiff.com on binary files with /o /html it crashes on binary files (result set is too large)
how can I avoid to compare binary files ? I do NOT know the file extensions in advance in general.
psguru
PrestoSoft
PrestoSoft
Re: commandline and binary files
I can't reproduce your problem. Even if you use "Full file comparison" under Options | Dir Comparison, binary files are only compared to determine that they are different or identical, and only a small buffer at a time. The only possibility I can see here is that you force binary files to be compared as text files under Options | Compare.
psguru
PrestoSoft
PrestoSoft
Re: commandline and binary files
The problem is as follows:
I compare recursively two directories on the commandline. They contain both txt and binary files, I do not know the extensions of any binary in advance. The aim is to generate a html diff report for each file (except binaries).
Now to solve this problem I first do a examdiff.com /o:statusreport.txt
I then have the statusreport.txt for each file which is different but I do NOT have the information if it is binary or not. !
In a second step I do a diff for each of the files of statusreport.txt which had the line "Different files ->" in this report.
But in this second step I have to do the diff TWICE, as I do not know if the file is binary or not, and as I said I had some crashes with examdiff.com /html on binary files. So I do
A2. a examdiff.com /o:fileresult.txt on each file to find out if it is binary or not.
in a second step I do the same
B2. a examdiff.com /o:"+fullpathReportFile+" /html" on the text only file.
For the binaries found out in A1 i only do a small report that the binaries differ.
So this explains my algorithm, and the main drawback with examdiff.com is that i have to do the actuall diff twice in the second step, as in the first step (diff on directories, I do not get the information if the file is text or binary).
Hence I have to do a diff TWICE on each file, first to find out if it is binary and then do the diff with /html if it is not.
I have a solution now which is similar to the unix "file" command (which give information about text or binary) but I think it would be an improvement for examdiff.com if it could report this as well during directory comparison.
thanks,
Bernhard.
I compare recursively two directories on the commandline. They contain both txt and binary files, I do not know the extensions of any binary in advance. The aim is to generate a html diff report for each file (except binaries).
Now to solve this problem I first do a examdiff.com /o:statusreport.txt
I then have the statusreport.txt for each file which is different but I do NOT have the information if it is binary or not. !
In a second step I do a diff for each of the files of statusreport.txt which had the line "Different files ->" in this report.
But in this second step I have to do the diff TWICE, as I do not know if the file is binary or not, and as I said I had some crashes with examdiff.com /html on binary files. So I do
A2. a examdiff.com /o:fileresult.txt on each file to find out if it is binary or not.
in a second step I do the same
B2. a examdiff.com /o:"+fullpathReportFile+" /html" on the text only file.
For the binaries found out in A1 i only do a small report that the binaries differ.
So this explains my algorithm, and the main drawback with examdiff.com is that i have to do the actuall diff twice in the second step, as in the first step (diff on directories, I do not get the information if the file is text or binary).
Hence I have to do a diff TWICE on each file, first to find out if it is binary and then do the diff with /html if it is not.
I have a solution now which is similar to the unix "file" command (which give information about text or binary) but I think it would be an improvement for examdiff.com if it could report this as well during directory comparison.
thanks,
Bernhard.
Re: commandline and binary files
I'd need a reproducible scenario for this. Is it happening in 4.0?as I said I had some crashes with examdiff.com /html on binary files
I see your problem now. The best solution for you would be implementing one feature on the wish list ("Create directory comparison HTML diff report with links to file comparison HTML diff reports") but we currently are not planning to do so in the next version. Perhaps our plans will change though.
I think your current solution is the best you can do today. I can imagine a batch file that would iterate through the results of the directory comparison and, with the help of the "file" command produce HTML outputs for each pair of different files.
psguru
PrestoSoft
PrestoSoft
Re: commandline and binary files
it is reproduceable with 4.0 and I sent you a testcase via gmail.
thanks,
Bernhard.
thanks,
Bernhard.