Being completely green to Windows shell and cmd scripting, I'm banging my head against this particular problem but coming up with nothing.
What I'm aiming to do is add a context menu item to right clicking on a file to launch WinMerge and compare it to that file in a separate, static directory. It shouldn't matter if this invokes a particular cmd file that then performs the operations to resolve the directories.
For example, we have a hypothetical set of directories and files:
C:\released\versions\1.0\lib\libcode.cpp
C:\released\versions\1.0\component\componentcode.cpp
C:\dev\lib\libcode.cpp
C:\dev\component\componentcode.cpp
Right clicking on C:\released\versions\1.0\component\componentcode.cpp and selecting this will open WinMerge and compare it to C:\dev\component\componentcode.cpp
We can assume that everything \dev\ and \1.0\ structure-wise is identical for all intents and purposes. Obviously the launch command for WinMerge itself is trivial, but I'm having trouble determining the relative paths to files inside the base code directory.