Last active
October 1, 2018 11:50
-
-
Save metelkin/973498479ab6f9a96f9f3254d2a5b9be to your computer and use it in GitHub Desktop.
BAT file to switch file comparison adapted for git difftool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
; using windows tools to compare files | |
[diff] | |
tool=windiff | |
; set location of windiff.bat | |
[difftool "windiff"] | |
cmd = \"C:/windiff/windiff.bat\" \"$LOCAL\" \"$REMOTE\" | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM 1 - local (source) | |
REM 2 - remote (destination) | |
REM as an exaple the file is located in "C:/windiff/" | |
IF %~x2==.xlsx ( | |
"C:\Program Files (x86)\ExcelMerge\ExcelMerge.GUI.exe" diff -s %1 -d %2 | |
) ELSE IF %~x2==.xlsm ( | |
"C:\Program Files (x86)\ExcelMerge\ExcelMerge.GUI.exe" diff -s %1 -d %2 | |
) ELSE IF %~x2==.xls ( | |
"C:\Program Files (x86)\ExcelMerge\ExcelMerge.GUI.exe" diff -s %1 -d %2 | |
) ELSE ( | |
"C:\Program Files (x86)\WinMerge\WinMergeU.exe" -u -e %1 %2 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment