News Archives 2022 Q3
2022-09-27
•
URLEscape.exe 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
FOR /F
loop, escaped spaces (
%20
) may be interpreted as
%2
(second command line argument) followed by a zero.
2022-09-25
•
CompareImages.exe 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
myimage.jpg
to
myimage.jpg_original
and saves the modified image under the original
myimage.jpg
name.
So next, if
myimage.jpg_original
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
IF %Errorlevel% EQU 0 DEL myimage.jpg_original
WARNING: Don't delete files based on this tool's output unless you have a verified backup available!
Optionally, you can use
CloneDate or
CaptureDate 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.
2022-09-10
2022-09-05
• A bug in
LoCase.exe was discovered: it would pass the input unmodified if the
/S
switch was used without the
/L
switch.
This has been fixed.
2022-09-04
•
LoCase.exe has been updated: it can now optionally turn a specified
part of a string or filename to lowercase, leaving the rest unchanged.
2022-09-03
•
Trim.exe 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.
•
HTMLEscape.exe is a new command line tool to HTML-escape text specified on the command line, or from a text file or from redirected input.
2022-08-27
• An additional test for improperly or unterminated curly braces has been added to
CheckVarsPHP.exe.
2022-08-03
•
CheckVarsPHP.exe has been updated: it now
does check for nested functions or unterminated curly braces.
2022-07-31
•
CheckVarsPHP.exe 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 (
$GLOBALS
, $_SERVER
, $_GET
, $_POST
, $_FILES
, $_COOKIE
, $_SESSION
, $_REQUEST
and $_ENV
)
- CheckVarsPHP does not check for nested functions
2022-07-14
• Bob Berry sent me sample batch code to demonstrate a flaw in batch programming:
IF condition (...)
ELSE (...)
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 program.
Thanks Bob
page last modified: 2022-10-23; loaded in 0.0017 seconds