Rob van der Woude's Scripting Pages

News Page

On this page I'll report on changes to my web site or related news items.

Don't expect a full-blown weblog, more like a list of highlights in shorthand.

For a file based list of changes look at the What's New list.

 

2024-04-21
• The list of Windows version numbers has been updated.

 

2024-04-20
Easter.bat has been updated:

 

2024-04-16
• Oops, looks like CompareVersions.bat had been simplified too much:

 

2024-04-15
CompareVersions.bat has been rewritten and simplified.
Warning: return codes in the new version 2.00 have changed!

 

2024-04-09
Yesterday.bat has been updated, after Daniele Zanotti reported that its JDate function failed on leading zeroes.
I corrected the error, and will be investigating other batch files as well, as I seem to remember this function was used more than once...

Thanks Daniele
• An error was reported in the Batch HowTo Verify if variables are defined page:
The following code, which works in batch files for all MS-DOS, Windows and OS/2 versions, uses an alternative way to show if a variable is defined or not:

IF "%MyVar%"=="" (ECHO MyVar is NOT defined) ELSE (ECHO MyVar IS defined)
Oops! This is not true, of course, MS-DOS and OS/2 batch interpreters don't support parentheses, nor IF ... ELSE!
The following 2 lines of code are compatible with all batch interpreters, provided %MyVar% itself does not contain doublequotes:
IF "%MyVar%"=="" ECHO MyVar is NOT defined
IF NOT "%MyVar%"=="" ECHO MyVar IS defined
• While browsing my directory of batch files I noticed Obscure.bat, a 20 years old demo batch file demonstrating how URLs can be made to look completely different.
This batch file converted an IPv4 address into a decimal number, but due to 32-bit integer limitations it had to prompt for some manual editing for IP addresses starting with 128 or higher.
It suddenly occurred to me that I might as well try using a hexadecimal number instead of decimal, which can be "computed" without integer math (e.g. 128.10.0.255 can be represented as 0x800A00FF: 128=0x80, 10=0x0A, 0=0x00, 255=0xFF).
This worked for pinging a host — but thank goodness these days the web is protected against abusing this trick, by browser security as well as by content delivery networks like CloudFlare.

 

 

Archived News

Archived news from 2024
Archived news from 2023
Archived news from 2022
Archived news from 2021
Archived news from 2020
Archived news from 2019
Archived news from 2018
Archived news from 2017
Archived news from 2016
Archived news from 2015
Archived news from 2014
Archived news from 2013
Archived news from 2012
Archived news from 2011
Archived news from 2010
Archived news from 2009
Archived news from 2008
Archived news from 2007
 

 

Archived News pages

 


page last modified: 2024-04-21; loaded in 0.0057 seconds