Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Determine version of TCMD.EXE available for download

Aug
2,082
85
.btm to show the version of TCMD.EXE available for download.

Code:
R:\>aiu 
Getting File info for https://jpsoft.com/downloads/v33/TCMD.EXE
Name           : Take Command 33.0.9
Product Version: 33.0.9
Release Date   : 19/09/2024

Code:
@SETLOCAL
@ECHO OFF
::    File: aiu.btm
:: Created: 2024-09-20
::   _4ver: 33.00
:: _winver: 10.0
iff %_x64 eq 1 then
    iff %_admin eq 1 then
        iff %_elevated eq 1 then
        :: NEXT SENTENCE
    else
        echo Note that this .BTM was tested on a 64-bit version of Windows,
        echo as Administrator,
        echo from an elevated process.
        echo.
        echo You are running the following;
        echo      _x64: 1
        echo    _admin: 1
        echo _elevated: 1
        pause
        endiff
    endiff
endiff

:: Drive R:\ is a 2GB RAMDrive
if isdir r:\temp set temp=r:\temp

iff %1 eq edit then
    tcedit aiu.btm
    quit
endiff

iff %1 eq view then
view aiu.btm
    quit
endiff

echo Getting File info for https://jpsoft.com/downloads/v33/TCMD.EXE
copy /q https://jpsoft.com/downloads/v33/tcmdupdate.aiu %temp
  
iff exist %temp\tcmdupdate.aiu then
  echo Name           : %@iniread[%temp\tcmdupdate.aiu,Update,Name]
  echo Product Version: %@iniread[%temp\tcmdupdate.aiu,Update,ProductVersion]
  echo Release Date   : %@iniread[%temp\tcmdupdate.aiu,Update,ReleaseDate]
else
  echo %temp\tcmdupdate.aiu does not exist.
endif

ENDLOCAL

Joe
 
Alternatively (for part of it)

Code:
v:\> type "https://jpsoft.com/downloads/v33/tcmdupdate.aiu" | tpipe /grep=3,0,0,0,0,0,0,0,"^Name|ProductVersion|ReleaseDate"
Name = Take Command 33.0.9
ProductVersion = 33.0.9
ReleaseDate = 19/09/2024

Or with Gnu grep.

Code:
v:\> type "https://jpsoft.com/downloads/v33/tcmdupdate.aiu" | grep -E "^Name|ProductVersion|ReleaseDate"
Name = Take Command 33.0.9
ProductVersion = 33.0.9
ReleaseDate = 19/09/2024

I tried IF EXIST on the URL and got strange results.

Code:
v:\> if exist "https://jp" echo yes
yes
 
Works quite well as an alias;
Code:
aiu=type "https://jpsoft.com/downloads/v33/tcmdupdate.aiu" | tpipe /grep=3,0,0,0,0,0,0,0,"^Name|ProductVersion|ReleaseDate"

Code:
U:\>aiu 
Name = Take Command 33.0.9
ProductVersion = 33.0.9
ReleaseDate = 19/09/2024

U:\>which aiu 
aiu is an alias : type "https://jpsoft.com/downloads/v33/tcmdupdate.aiu" | tpipe /grep=3,0,0,0,0,0,0,0,"^Name|ProductVersion|ReleaseDate"

Joe
 
Back
Top
[FOX] Ultimate Translator
Translate