Sugestion: File Comparison Command Feature

Discuss new features and functions
Posts: 2
Joined: 1 Nov 2024

gnumaru

It would be very usefull if the right click menu for a file had an option like "Compare using a custom command".

This would use a custom shell command to compare the left and the right pane files. The custom shell command would be provided by the user in the settings window, and there could be a generic command (user provided) used for any file extension and other more specific commands for different file extensions (also user providede commands).

For example, the user could configure the generic command to be "diff %LeftFile% %RightFile%" and use the default unix command diff to check file differences (usefull for text files, not so usefull for other kinds of files). Then when the user do a comparison where a file is different in the left and right panes, the user could select this option in the right click menu and then the application would just open a visible terminal window and invoke the given comand replacing the %LeftFile% and %RightFile% variables with the full file path for the files.

Then, for image files (.jpg for example) the user could provide another command invoking some visual diff comparer to compare image files. Again, the user could provide a more complex command to compare json files using something like "my-json-beautifier %LeftFile% | diff - <(my-json-beautifier | %RightFile%)".
Posts: 2
Joined: 1 Nov 2024

gnumaru

Thanks. I didn't know something like this already existed.

I searched the manual.

https://freefilesync.org/manual.php?topic=all

And found about "Customize context menu" at "Menu → Tools → Options → Customize context menu"

Then I set up the command bellow

WinMergeU.exe "%local_path%" "%local_path2%"

And now I'm able to diff files on windows using winmerge =).