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,308
111
.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
 
Several of us are seeing this. It is being discussed here, in the Support forum.
 
Apologies.

I updated this back on October 9 to use curl instead of internal copy.

Joe


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
::As of 2024/10/09 returns TCC: HTTP protocol error. 403 Forbidden. "https://jpsoft.com/downloads/v33/tcmdupdate.aiu"
::Switched to curl.exe instead of copy.
curl.exe -s -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0" -O https://jpsoft.com/downloads/v33/tcmdupdate.aiu

if exist tcmdupdate.aiu move /q 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]
  echo Installed Vers : %_4ver.%_build
else
  echo %temp\tcmdupdate.aiu does not exist.
endif

ENDLOCAL

Results:
Code:
U:\>aiu 
Getting File info for https://jpsoft.com/downloads/v33/TCMD.EXE
Name           : Take Command 33.0.18
Product Version: 33.0.18
Release Date   : 04/11/2024
Installed Vers : 33.00.15

Joe
 
While that's being fixed, you could use CURL.EXE and FINDSTR.EXE (both Windows built-in) to download the the .aiu file and get version info out of it. This works here. [Or TPIPE's grep as you did for more information.]

Code:
v:\> curl.exe -s -A "moi" -O https://jpsoft.com/downloads/v33/tcmdupdate.aiu & findstr /C:"Version = " tcmdupdate.aiu
ProductVersion = 33.0.18
Version = 33.0.18.0
 
Indeed.

Thanks Vince;
Code:
curl.exe -s -A "moi" -O https://jpsoft.com/downloads/v33/tcmdupdate.aiu & type tcmdupdate.aiu | tpipe /grep=3,0,0,0,0,0,0,0,"^Name|ProductVersion|ReleaseDate"

Output;
Code:
Name = Take Command 33.0.18
ProductVersion = 33.0.18
ReleaseDate = 04/11/2024

Joe
 
About curl:

Apparently, the curl.exe in Windows is v8.9.1. It's somehow related to Gnu and it has no manual.

Code:
v:\> curl --version
curl 8.9.1 (Windows) libcurl/8.9.1 Schannel zlib/1.3 WinIDN
Release-Date: 2024-07-31
Protocols: dict file ftp ftps http https imap imaps ipfs ipns mqtt pop3 pop3s smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS HSTS HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM SPNEGO SSL SSPI threadsafe Unicode UnixSockets

v:\> curl --manual
Warning: built-in manual was disabled at build-time

This was easy to find.

Code:
v:\> d:\gnu\curl --version
curl 8.11.0 (x86_64-w64-mingw32) libcurl/8.11.0 LibreSSL/4.0.0 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 WinIDN libpsl/0.21.5 libssh2/1.11.1 nghttp2/1.64.0 ngtcp2/1.9.1 nghttp3/1.6.0
Release-Date: 2024-11-06
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli CAcert HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL SSPI threadsafe UnixSockets zstd

And g:\gnu\curl --manual gives a ~7000 line manual. I copied only curl.exe and libcurl-x64.dll from the distribution zipfile.
 
And you don't have to save it to a file. Without "-O" it goes to stdout. A binary file would probably make a mess.

Code:
v:\> curl -s -A "moi" https://jpsoft.com/downloads/v33/tcmdupdate.aiu | grep Version
ProductVersion = 33.0.18
Version = 33.0.18.0
 
You can get header info also.

Code:
d:\gnu> 2>&1 curl -s -v -X HEAD -A "moi" https://jpsoft.com/downloads/v33/tcmd.exe | grep -E "last-modified|content-length" | cut -d " " -f3-
92558160
Tue, 05 Nov 2024 05:11:27 GMT
 
Here's the unofficial manual page for CURL, which was added to Windows 10 (1803) from build 17063 or later.


Joe
I'll bet a lot of the stuff mentioned there has been removed from the WIndows one (like the manual). The Windows curl.exe is 676,400 bytes while the one I got today is 3,638,888 (plus a 3,188,840 byte libcurl-x64.dll).
 
Here's how to get the commands available with the Windows version of curl.exe;
Code:
curl.exe --help

Joe
 
Here's how to get the commands available with the Windows version of curl.exe;
Code:
curl.exe --help

Joe
But the manual in the one I downloaded shows hundreds of command line options. You can also, for example, curl --help http and get more help. That's as far as I looked and I didn't find any mention of -X HEAD, needed to get file size and time. I like having all the help in one file. I knew the HEAD method was needed so I searched the file for (case sensitive) "HEAD" and found the -X option.
 
Back
Top