Patrick Harrison's
Small Utility Programs

This page describes and provides links to download some small MS Win32 (x86) Command Line and Windows GUI programs that I have written over past years and which someone else might find useful. They should all work on MS Windows XP/Vista/Win7/Win10 systems, and currently all these compiled versions do run on both my Windows XP (32bit) and Windows 10 (64bit) systems. Most of them were originally written many years ago but later versions have been revised and recompiled more recently using MS Visual Studio 2017 targetted for the Win32 XP/SDK7 platform. It is unlikely that I will add to or update the available program files here - ie: these are the last editions that I will ever be sharing here.

I can provide no guarantee as to their working correctly on any particular machine, especially the GUI applications which may require the installation of additional shared DLLs to execute on pre Win XP operating systems.   There are no virus or nasties in the programs as they are provided here - they simpy work as described.   The programs are not made available for commercial distribution and are intended for personal use only.    I can take no responsibility for loss arising from their misuse or installation either through misunderstanding or mistake, nor give any guarantee about their integrity if they are obtained from other than my home site.  In any case, as with any program from an unverified source (I am assuming you do not know me personally) , you should virus check them before using them and use them with caution.

There is scant documentation with most of the programs, as they are generally very simple utilities with self evident controls and/or commands. The programs are all described below with a download link for each executable, but you may get all the files, zipped up, from here: winzip patsutils.zip.

Win32 Command Line (Console) Utilities

Some of these utilities were orginally written for and compiled using Borland Turbo C Version 1.5 for 8 bit DOS (circa 1987!), then Win32 C compilers lcc-win32 V3.8 and Microsoft Visual C++ V5.0 - both of Win95 vintage. They were then revised and recompiled using MS Visual Studio 2017 targetted to the Win32 XP/SDK7 platform in 2017/2018.

The Command line utilities I wrote to facilitate batch file processing and command output logging in my work when I was a systems administrator. Most are simple command line utilities which execute, produce output to the screen and terminate. The outputs can be redirected to log files using ">", the standard output redirection operator.

I am sure there are fancier utilities than these around, but not necessarily available at the time they were written and for the exact purposes that they were written (eg: returning meaningful exit codes to DOS for intelligent batchfile processing). At home, I keep them all in a single utilities directory which is added to my PATH.

Most of them provide a help message if invoked without parameters, or if they would normally work without a parameter then try /? /h or just ? by itself.

Utilities mostly useful in Batch file processing & logging

+ Now.exe A simple command which displays the date and time in RFC2822 format:
"Sat, 13 May 2000 14:38:56 -1100". Other formats are available - use "now /?" for help.
+ WaitFor.exe Waits for a specified number of seconds, or until user presses ^C or ^Break. Returns errorlevel 0 for time expired, 1 for user break or 2 for error. Useful for introducing time delays in batch files. Enter 'waitfor' for help text. Note: MSWin 7 and later have a system command 'waitfor.exe' which has a different function, so this executable should be renamed before installation.
+ WaitTil.exe Waits until a specified time, or until user presses ^C or ^Break. Returns errorlevel 0 for time reached, 1 for user break or 2 for error. Useful for introducing a time delay to a specific time in batch files. Enter 'waittil' for help text.
+ chkfdate.exe Checks the file date of a specified file against a given date (default today). Displays an appropriate message and returns errorlevel to indicate whether the file is older, same or earlier than the date specified. Enter 'Chkfdate' without parameters for help text.
+ ChkTime.exe Compares the actual time (now) to a given time. Displays an appropriate message and returns errorlevel 0 if given time is later than now, 1 if it is now, 2 if earlier than now or 3 for an Incorrect Call. Enter 'chktime' without parameters for help text.
+ IsLoaded.exe Checks Window's system for a named program window, that is whether it is loaded or not. Returns errorlevel 0 or 1 for YES or NO respectively. Enter 'isloaded' without parameters for help text.
+ IsRunning.exe Checks Window's system for a named process in memory, that is whether it is running or not. Returns errorlevel 0 or 1 for YES or NO respectively. Enter 'isrunning' without parameters for help text.
+ IsWriteable.exe Tests a given pathname's attributes and user permissions to write to that directory or file. Returns errorlevel 0 for YES or 1 - 5 for NO. Enter 'iswriteable' without parameters for help text.

Small Applications

+ LastFileAccess.exe A console application which just lists the last access date of files or directories in a specified directory. Can specify recursion. (In Win9x when Explorer is used to display properties, the last access date is reset to that access - console command DIR /V is OK but cluttered with other columns and numeric month-day-year dates). Enter "LastFileAccess /?" to display help text.
+ Dos2Unix.exe
    Unix2Dos.exe
Convert text files from MSDOS to unix text format and vice versa. Run the programs without arguments to get a help screen.
See also the Win32 GUI version v Dos4Unix described below.
+ ChangeFDate.exe A console application which changes file modification dates of and in files. A specific date and/or time may be specified, or a relative time change in minutes and seconds. The change may optionally be applied also to the file creation date, and for JPEG Exif files, to the EXIF dates within the file. Alternatively, the file dates may be set from the Exif creation date (if Exif data is present within a JPEG file). The program was created to align the modification dates of digital photos from two different cameras which did not have their date-times aligned. [So now when ordered by modification date, the picture files from both cameras of the same event or trip are displayed in chronological sequence regardless of which camera each image came from]. Enter the program name without parameters "changefdate" to display help text.
+Sudoku.exe
    SDKinput.txt
    Grid25.txt
 
   Java Version
Requires JRE 1.5, to run use command: 
"java -jar Sudoku.jar [inputfile]"
Solves Sudoku puzzles. This is a command line program which takes its input from a text file specifying the sudoku puzzle to solve (default "SDKinput.txt" if not specified on the command line). Prints out the solution, or if the "-m" command line switch is used all solutions, as simple text to the standard output which may be piped or redirected to a file. The text file must specify the length of the inner grid size ("S"), followed by values: 0 for blank cells and 1 to "S squared" representing the starting values of the grid. (EG: the normal sudoku grid is a 9x9 grid with an inner square side length 3, values 1-9. A grid with an inner square side length 5 will have values 1-25. And of course 0 for the blank cells). Comments may then be appended to the file. see SDKinput.txt and Grid25.txt for examples. Command "sudoku /?" will display help text. This program does NOT generate new puzzles. See also the Windows GUI version for 9x9 Sudoku grids below v SudokuGUI.

Win32 Windows GUI Applications

Some small MS Win32 GUI applications originally coded using MS Visual C++ V5.0, generally using the Microsoft Foundation Class Library (MFC). Revised and recompiled in 2017 & 2018 using MS Visual Studio 2017 targetted to the Win32 XP/SDK7 platform. Should work on all MS Windows systems from XP to Windows 10 and hopefully later.

+ MyClock.exe A fairly small window displaying a clock with date near the top left of the screen. Simple key controls to switch between analog and digital clock, pause the clock, toggle 'on top' behaviour and to quit. Press'?' key for help or ESCAPE key to quit.
+ MyCalendar.exe A fairly small window displaying 1 calendar month (default this month). Simple button controls to flip forward or back by month, year or century; or to return to the current month. A couple of dialog based date calculators (date-date and date+days). Highlights today's date and Easter. Can also display Australian Public Service ("PS") or off ("Super") paydays. Help button.
+ GCDistances.exe
      + DataFile
A very basic program which enables you to calculates the Great Circle Distance from one position on the globe to another (expressed as Latitude/Longitude). Some airlines once used the great circle distance between airports to calculate earned frequent flier points. Source and destination data entry boxes are drop down selection boxes with locations read from the data file "places.gcd" which can be edited using a normal text editor (there is a button to do this). There is adequate instructions on the dialog box and in the data file.
+ Dos4Unix.exe
Converts text files from MSDOS to unix text format or vice versa (functionality: dos2unix + unix2dos = dos4unix). Standard MS Windows file selection dialog window. Check boxes for some simple options. Buttons to preview selected files, convert selected files DOS->Unix or Unix->DOS. Default startup options may be set on the program command line. Appropriate help included in the program.
+ ChfdateGUI.exe
Windows dialog version of console program ChangeFDate. Changes file modification dates of and in files. A specific date and/or time may be specified, or a relative time change in minutes and seconds. The change may optionally be applied also to the file creation date, and for JPEG Exif files, to the EXIF dates within the file. Alternatively, the file dates may be set from the EXIF creation date (if Exif data is present within a JPEG file). The program was created to align the modification dates of digital photos from two different cameras which did not have their date-times aligned. [So now when ordered by modification date, the picture files from both cameras of the same event or trip are displayed in chronological sequence regardless of which camera each image came from]. Includes help dialogs.
+ MyDiary.exe
      + MyAlarm.exe
      + MyDiaryFAQ
A very simple reminder message system consisting of two complementary programs. MyDiary which allows user to enter and manage reminder messages and MyAlarm which displays reminder messages which have reached or passed their 'activation date'. MyAlarm is NOT a 'memory resident' program, rather a shortcut to MyAlarm is placed in the Start->Programs->Startup so that it pops up on login if there are any outstanding reminder messages. See MyDiaryFAQ for further details.
+ SudokuGUI.exe
    + Java GUI Version
Requires JRE 1.5 or later, to run use 
command: "java -jar sudokugui.jar"
A windows GUI program which solves 9x9 Sudoku puzzles which the user can enter using the dialog provided or which can be loaded from a file. This program does NOT generate new puzzles. Use mouse or tab key to edit the sudoku cells entering values 1 - 9. Use delete or backspace key to remove a value. Where there is more than one solution to a puzzle (eg: with a blank grid) the solution returned is chosen at random. Use the save button to save a grid file which may then be examined / changed using a text editor. There is appropriate help included in program. The Java version GUI works with different size grids - achieved by loading a grid file for a different size (see help in program). See also the more powerful but less intuitive command line versions which can solve grids of different sizes and list all solutions when there is more than one.^ Sudoku.

This page accessed Hit
  Count times since September 2023


Valid HTML 5 Validated HTML and CSS Valid CSS!