News Archives 2022 Q3
is a new command line tool to URL-escape a URL specified on the command line, or from a text file or from redirected input.
It does not
escape colons and forward slashes!
Be aware that if you want to "capture" the output in a
loop, escaped spaces (
) may be interpreted as
(second command line argument) followed by a zero.
is a new command line tool to compare 2 images pixel by pixel, ignoring EXIF and IPTC metadata.
I wrote it to automate the process of restoring EXIF metadata in JPG files edited with Corel paintshop Pro (which corrupts part of the EXIF metadata).
After editing a photograph with Corel paintshop Pro and saving it as JPG file, I use ExifTool
by Phil Harvey to copy the EXIF data from the raw image to the edited JPG file:
exiftool.exe -TagsFromFile myimage.cr2 myimage.jpg
ExifTool renames the original
and saves the modified image under the original
So next, if
exists, I use CompareImages.exe
to check if I can delete the original file (the one with the corrupted EXIF data):
CompareImages.exe myimage.jpg myimage.jpg_original
WARNING: Don't delete files based on this tool's output unless you have a verified backup available!
IF %Errorlevel% EQU 0 DEL myimage.jpg_original
Optionally, you can use CloneDate
to set the file time to the capture time.
Comparing images can be done interactively too, I used WinMerge
up till now, but having to restore well over 10,000 photos I decided to automate it.
• A bug in LoCase.exe
was discovered: it would pass the input unmodified if the
switch was used without the
This has been fixed.
has been updated: it can now optionally turn a specified part
of a string or filename to lowercase, leaving the rest unchanged.
is a new command line tool to trim leading and trailing whitespace (including linefeeds) from text specified on the command line, or from a text file or from redirected input.
is a new command line tool to HTML-escape text specified on the command line, or from a text file or from redirected input.
• An additional test for improperly or unterminated curly braces has been added to CheckVarsPHP.exe
has been updated: it now does
check for nested functions or unterminated curly braces.
is a new quick-and-dirty program to check PHP code for unused variables and functions.
Though it was derived from CheckVarsVBS.exe
, there are some differences:
- CheckVarsPHP considers a variable unused if it occurs just once, except for superglobal variables (
- CheckVarsPHP does not check for nested functions
• Bob Berry sent me sample batch code to demonstrate a flaw in batch programming:
IF condition (...)
will return incorrect results, especially when nested, but it will not
generate a warning or error message.
The proper format is
IF condition (...) ELSE (...)
where the parts between parentheses may or may not be spread over multiple lines:
IF condition (
) ELSE (
As this error is easy to detect and correct, I added a test for this error in my BatCodeCheck
page last modified: 2022-10-23