Command line save output to file
Windows visual diff and merge for files and directories
Brought to you by:
christianlist,
grimmdp
Do you mean that you want to output a patch or a report from the command line?
Although it is not yet written in the manual, you can output the report from the command line as follows. Currently, to output a patch from the command line is not supported.
File comparison report
Folder Comparison Report
Hello, I tried using the "File comparison report" code above and the report is not generated for me. When I remove the -minimize and -noninteractive I can see the results are populated, but I cannot figure out what I am doing wrong.
"C:\Program Files (x86)\WinMerge\WinMergeU.exe" C:\Workspace\Imports\pilot.csv C:\Workspace\Imports\prod.csv -minimize -noninteractive -u -or C:\Workspace\Imports\Results\results.html
I could not reproduce it.
Have you checked whether the report file was created immediately after executing the above command?
Because WinMerge is a GUI program, it returns control to the caller before the WinMerge process exits.
Therefore, if you wait for a while, the report file may be created.
Last edit: Takashi Sawanaka 2018-07-17
The report file is never generated. I have tried running through both a .cmd file and in the command prompt interface. The command finishes instantly and simply does not seem to make the file. Is there any error logs by winmerge that I could check or do you have any ideas on what do do differently? Thank you for taking the time!
Unfortunately, there is no winmerge log file.
It is not user-friendly not to output error messages or logs. We need to improve it.
By the way, does the C:\Workspace\Imports\ folder exist? If it does not exist, the report file is not created.
Thanks. Is there an option to generate a summary/project file? Like out.WinMerge?
Unfortunately, there is no such option.
this command WinMergeu c:\temp\log c:\temp\log2 -minimize -noninteractive -noprefs -cfg Settings/DirViewExpandSubdirs=1 -cfg ReportFiles/ReportType=2 -cfg ReportFiles/IncludeFileCmpReport=0 -or c:\temp\outfolder.html will produce a summary file. But is there a way to exclude the identical result from the file?
Please add
-cfg Settings/ShowIdentical=0optionThank you for this feature.
I have some very big text files to compare.
So in the command line mode for File Comparison is there any way to generate the comparison report showing only the differences ? Also i don't need the html format is there any way to change the html report to txt report with just differences ?
Last edit: Siva Kumar Kapu 2018-05-10
Please Add
-cfg Settings/DiffContextV2=0to command line.Unfortunately, currently, there is no way to create text report..
Works like a charm.. Thank you so much for the quick response
Hello,
I'm trying to do the same here.
using folowwing commande, the report file is not created.
winmergeU path_to_file_A path_to_file_A -minimize -noninteractive -noprefs -cfg Settings/DirViewExpandSubdirs=1 -cfg Settings/ShowIdentical=0 -cfg ReportFiles/ReportType=2 -cfg ReportFiles/IncludeFileCmpReport=1 -r -u -or path_to_html_report_file
any idea why it's not working ?
Thanks
I am encountering the same thing. I tried running the script as adminsitrator and that did not help either. If I open Winmerge and compare the same two files and go to options and genereate a report with the same filename in the same location, it works.
Could you see the result when deleting
-minimize -noninteractiveoption from above command line?If you specified an incorrect path, Current version of WinMerge may exit without displaying an error.
First of, winmerge is an amazing tool which I use probably everyday. thanks for the amazing support!
Follow up to this issue:
I tried it with removing the -minimize -noninteractive parameters and it does not work.
it seems like with the -noninteractive parameter, the application will just exit and do nothing. leaving it out, causes the comparison to run, but a report is still not being generated automatically.
Any updates will be appreciated.
Hello,
Is there any way to generate patch from command line in WinMerge.?(Like the way we are generating from GUI tools->Generate Patch and providing the file names)
Any help would be appreciated.
Last edit: Rambabu Garikapati 2020-02-03