How to? Compare executables' version/build # including 123.456.789.01

Oct 18, 2009
I have some executables that need to be updated each time Win 10 does a Spring/Fall update.

I'm wondering if there is an easy way to compare version numbers for a "greater than", "less than" approach. I'm not talking about version numbers in the sense of Win 8 and Win 8.1, and I'm not thinking of a particular product (e.g., Windows or TCMD).

For instance, on this PC echo %@verinfo[%windir\explorer.exe] produces:
10.0.17763.1 (WinBuild.160101.0800) [which is Oct 2018, ver 1809]

The version that had to be replaced has:
10.0.17134.165 (WinBuild.160101.0800) [which is Apr 2018, ver 1803]

Note that--as is common with version number schemes--there is more than one period in the version number, so a simple numeric comparison won't work.

I do realize the number can be parsed into fields and then the individual fields can be compared. But I'm wondering if there is a simpler way.

Or maybe TCC could add an @VERCOMP[path1,path2] function that returns Newer, Same, or Older (probably 1 for "file 1 is newer build, 0 for "same build", -1 for "file 1 is older build")
Oct 18, 2009
By the way, the reason I need it is this:

I need to have multiple icons on the taskbar that each open a different folder in File Explorer. Windows doesn't allow that because it sees those all as File Explorer.

Even if you put separate links directly in C:\Users\{username}\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar Windows won't display them.

I create a C:\Program Files\Taskbar-Duplicates\ folder and have renamed copies of explorer.exe there. Windows sees those as different programs and shows them separately in the taskbar.

The problem is that each time MS updates explorer.exe none of those work, so I have to copy and rename all again. I know to do that, but for those with no technical background it would be easier to tell them, "If these icons ... have stopped working, run this .btm file and try again," and the file checks and re-copies if necessary.
May 20, 2008
Syracuse, NY, USA
It doesn't take much of a BTM (or library routine) to do that. Here's a very skimpy one (which doesn't handle surprises).
set rv=0
do i=0 to 3
    set a=%@word[".",%i,%1]
    set b=%@word[".",%i,%2]
    if %a LT %b (set rv=-1 & leave)
    if %a GT %b (set rv=1 & leave)
echo %rv
quit %rv
Apr 2, 2011
North Carolina, USA
Just the link in the text. (Which does not in fact point to the function I intended. But it seems it was close enough for Rick to find the right one.)

I didn't see the link in the text. Wonder if i can chage the colors so it makes links different then reg. text.

Charles Dye

Super Moderator
Staff member
May 20, 2008
Albuquerque, NM
I didn't see the link in the text. Wonder if i can chage the colors so it makes links different then reg. text.

Here, using Chrome, they're blue (regular text is black by default.) And that specific link is boldface. Does it really look the same on your system? Are you using some unusual browser?
Oct 18, 2009
I'm planning on doing something that will read in a list of files and do a "compare this with that and if that is newer, copy it to this."
Apr 2, 2011
North Carolina, USA
Here, using Chrome, they're blue (regular text is black by default.) And that specific link is boldface. Does it really look the same on your system? Are you using some unusual browser?

Yes - the text and link appear the same color. I can barely tell the link is boldface. Using FF 65.0b9 (64-bit)
Similar threads
Thread starter Title Forum Replies Date
M How to? Compare file timestamps accross different file systems... Support 1
C custom string compare? Support 8
C Suggestions for Compare Folder Tree routine Support 5
MickeyF how to compare version strings Support 11
R best file compare util Support 5
deleyd Need example of @COMPARE Support 1
p.f.moore Compare 2 directories Support 8
D Version 28 LIBRARY changes have side effects Support 1
Dmitry L. Kobyakov How to? How to remove the record of the old version of the Take Command? Support 9
D Documentation WebHelp lands at version 26 Support 4 HELP!! I just updated to Version 28 and as usual I cannot make extended directory search work. Support 2
T Take Command 28: Lua reports version 5.4.0 (5.4.3 expected) Support 0
S Issues with version v26.02.42 x64 Support 0
Joe Caverly Documentation COMMANDS in Version 27 help Support 8
C version help Support 3
R Inconsistency in @version's use of quotes Support 2
thorntonpg What is the latest version of everything Support 1
S Windows Server version not being detected correctly in TCMD 26RC2 Support 9
D Which is the latest version for Windows XP? Support 2
gentzel "Check for Updates" appears to be checking for old version Support 2
D Fixed @VERSION does not increment pre-fixed version numbers. Support 1
nikbackm TCMD 25 - Unregister older TCMD version Support 2
Stefan Hassel Installation file TC 24.02 Build 47 is actually version 25.00.1 Support 10
Joe Caverly What version and Windows OS are you using? Support 3
Dmitry L. Kobyakov From old version: had the setup's error been corrected? Support 6
RChrismon How to? Copy TCMD.INI to New Version Support 7
vefatica Windows 10 version number? Support 6
H @ceiling @floor @int not working version 21.01.63 Support 9
B Everything version in Take Command build 39? Support 3
G Version 20.11 installed on Windows 10 problems Support 9
M ANSI is used to show files instead of OEM in version 17 to 19 ! Support 5
E How to? Create a portable version of TCMD to use on other computers w/o installation Support 4
C 21b47 version[] Support 4 Version 21.23 fails to install Support 4
E Fixed View command broken in version 21.0 build 22 Support 9
rconn News Take Command + TCC + TCC-RT Version 21 Public Beta (RC1) Support 0
R How to? Not have RT version show on start Support 3
Roedy WAD Version number Support 1
Craig Fitzgerald problem with executable extensons with TCC version 19.10.51 x64 Support 3
Jesse Heines How to? Everything Tool Not Working After Version 20 Installation Support 8
T Portable instructions for version 19 Support 7
cgunhouse Version 19.00.23 Crashes Support 16
vefatica Updater says wrong version Support 1
Sande Nissen TCC/LE version? Support 6
Mordachai Upgrades - can I skip version(s)? Support 2
D Version 18 changed the naming convention of TC's folder Support 5
D Started suggestions, not in this version (yet?) Support 1 How about updating the version shown when you upload a new one? Support 4
Joe Caverly PLUGINs and Version 17.0 Support 4
C Is 17.00.55 same as release version? Support 3

Similar threads