How to kill all processes with the same name in Windows 7?

Well, today at work I was using IBM Rational Synergy to sync my files and be able to compare them in order to determine which ones to keep / discard. The comparing tool I’m using is KDiff3, which in my opinion it’s ok, but when you select a bunch of files and compare them in bulk you get a lot of KDiff3 windows, one for each file being compared with the predecessor. So what do you do when you want to close all instances of the process with just one command?

The answer is this execute the following from a command window:

taskkill /F /IM kdiff3.exe /T

Of course you should replace kdiff3.exe with the name of the process you want to kill.