Shell Scripting Toolkit

Download here: sst27.zip

This is a small collection of Win32 console programs (command-line utilities) to assist with Cmd.exe shell scripting in Windows NT 4.0 and later. Documentation is provided in PDF format.

Note that these tools are essentially obsolete now that we have PowerShell, but they are somewhat interesting from a historical perspective.

The programs are as follows:

  • CCase – Converts standard input to upper or lowercase, and writes to standard output.
  • ColorX – Echoes the current screen colors to standard output, or sets the colors for the next text to be written to standard output.
  • DateX – Echoes the current date, a specified date, or an offset of either the current date or a specified date to standard output in a variety of formats.
  • DriveX – Returns the drive type for the current or a specified drive as an exit code, or echoes drives of a specified type to standard output.
  • EchoX – Echoes text to standard output in a specified color. Supports several escape characters and a formatting width and alignment.
  • FInfo – Echoes information about one or more files to standard output.
  • IfX – Case-insensitive string or or numeric comparison of two arguments (not needed on WinNT).
  • LineX – Counts the number of lines in standard input; prints a specific line, a range of lines, or a specified number of lines from the beginning or end of standard input. Can also output in reverse order.
  • S2V – A real-mode MS-DOS program that reads the first line of standard input and stores it into an environment variable (non-functional, and not needed, on WinNT).
  • ShellEsc –  For each line of standard input, inserts a shell escape character (^) before each reserved shell character, and writes it to standard output.
  • SleepX – Pauses a script for a specified period of time. Can display a prompt, and can optionally be interrupted by a keystroke.
  • Str – Counts characters in a string, echoes a string in upper or lowercase, and searches for one string in another.
  • Tee – Writes each line of standard input to a file and to standard output simultaneously.
  • TempName – Generates a temporary unique file name.

(In the above list, “WinNT” refers to the entire NT platform from Windows NT 3.1 onwards, including Windows 2000, Windows XP, Windows Server 2003, Windows 7, Windows Vista, Windows Server 2008, etc. etc. etc.)