Projects - Freeware - Windows

Some Win32 command line tools, written around 2000 in C++ using core Windows API. This makes those tools remarkebly small in size.

txtfilter.exe Win32 Console C++

Filter and convert text files.

  • Filtering: skip lines containing/not containing a list of keywords or regular expression.
  • Conversion: make upper case, lower case.
  • Misc: prepend line numbers.

TxtFilter screenshot

Requirements
  • Windows 9x or Windows NT >= 4
  • Source was compiled on VC 6 (should compile everywhere with small modifications).

Installation
Copy/extract to any folder. (For easier access, add this folder to your PATH environment variable.)

Usage
TxtFilter [OPTIONS] [<INPUT] [>OUTPUT]
type [MASK] | TxtFilter [OPTIONS] [>OUTPUT]
Enter TxtFilter -? for a list of options.

Samples
Copy lines containing 'error' or 'warning' (ignore case) from scr.txt to out.txt:
TxtFilter -ic -ferror -fwarning <scr.txt >out.txt
Copy lines containing 'foo bar' (exact spelling) from scr.txt to out.txt
TxtFilter -f"foo bar" <scr.txt >out.txt
Copy lines not containing 'foo' or 'bar' (exact spelling) from scr.txt to out.txt
TxtFilter-iv -ffoo -fbar <scr.txt >out.txt
Regular expressions can be used for more sophisticated matching:
copy lines that start with 'a' or end with 'z'
TxtFilter -reg"^a|z$" <scr.txt >out.txt
The 'type' command can be used to process multiple files by specifying a mask:
copy all lines from all *.txt files to out.txt, prepend line numbers and convert to lower case
type *.txt | TxtFilter -lc -ln >out.txt
Also, the TxtFilter command can be chained:
copy all lines from all log files that do not contain '192.168.' and contain 'query':
type *.log | TxtFilter -iv -f"192.168." | TxtFilter -fquery >out.txt

Known Issues
Poor checking: binary files or extremly long lines will propably RIP.

wait.exe Win32 Console C++

Console program that waits for a given condition. This is particularly useful in batch files that start a sequence of programs that depend on each other.

  • Duration: wait N seconds.
  • Window title: wait until a window is found, that conatins a given string in the caption.
  • Process name: wait until a process with a given name is running.
  • Process window: wait until a process with a given name is running and has an visible window open.

wait screenshot

Requirements
  • Windows XP or Windows NT >= 4 or Windows Server > 2000
  • Source was compiled on VisualStudio 2005 (should compile everywhere with small modifications).

Installation
Copy/extract to any folder. (For easier access, add this folder to your PATH environment variable.)

Usage
wait [OPTIONS] [OUTPUT]
Enter wait -? for a list of options.

Samples

C:\Prj\cpp\wait\release>wait -?
wait v1.0 (c) 2008 martin@wwWendt.de  --  Apr  7 2008

Usage:
    wait SECONDS [OPTIONS] [MATCH, ...]

Options:
  -?        Print this help.
  -process  Wait until a process named MATCH is running.
  -procwin  Wait until a process named MATCH has a visible top-level window.
  -window   Wait for a visible top-level window title that contains MATCH.
            (This option is the default and may be omitted.)
  -q        Quiet mode.
  -p        Wait for [Enter] when done.
  -dump     Dump task list.

Examples:
> wait 2
    Wait 2 seconds.
> wait 10 "readme.txt - Editor"
    Wait until 'readme.txt' is open in the Windows Editor.
    Then return ERRORLEVEL 0. Timeout after 10 seconds with ERRORLEVEL 1.
> wait 0 "Mozilla Firefox"
    Check: return ERRORLEVEL 0, if Firefox is running. ERRORLEVEL 1 else.
> wait 10 -process firefox.exe iexplorer.exe
    Wait until Firefox OR Internet Explorer appear in the tasklist and
    return ERRORLEVEL 0.
    Timeout after 10 seconds with ERRORLEVEL 1.
> wait 10 -procwin firefox.exe
    Return ERRORLEVEL 0, when Firefox has a visible top-level window.
    Timeout after 10 seconds with ERRORLEVEL 1.

Matching is case-insensitive. If more than one MATCH is given, then OR is used.
Use double quotes (") if MATCH contains spaces.
Check the process list in the Task-Manager for the process name of a running
process.

Skript examples:
  Open a url and wait for the browser to open:
    START http://google.com/
    wait 10 "Google - "
  Start a server if neccessary, then open a url, when it runs:
    wait 0 -process nhttp.exe
    IF NOT ERRORLEVEL 1 GOTO FOUND
    start nhttp.exe
    wait 30 nhttp.exe
    wait 5
    :FOUND
    start http://localhost:8080/


C:\Prj\cpp\wait\release>_

Known Issues
This program uses psapi.dll, so it propably won't run on Windows 3.1, 95, 98 or ME.

wintail.exe Win32 GUI C++

Monitor log files in realtime.

  • Registers itself as File Explorer shell extension to add a Wintail... command to the context menu.
  • Implement a debug output window (even on a remote machine): let your debuggee write its output to a text file and open wintail. (Note: text file must be flushed after each line, so wintail gets notified.)
  • Audible change notification (*beep* for any changes or if special keywords occur).
  • Hilite lines containing keywords (e.g. 'error', ...).
  • Filtering: skip lines containing/not containing a list of keywords or regular expression.
  • Support for DOS and UNIX style text file.
  • Support for binary files (simple hex viewer).

wintail screenshot

Requirements
  • Windows 9x or Windows NT >= 4
  • Source was compiled on VC 6 (should compile everywhere with small modifications).

Installation
  • Copy/extract to any folder
  • Start WinTail.exe
  • Open "View" - "Options..." Menu
  • Click [Register as Shell extension]

Usage
  • Right click on any file in the Windows File Explorer
  • Choose "Open with Wintail..." or "Send to \ Wintail"

wintree.exe Win32 GUI C++

  • Registers itself as File Explorer shell extension to add a Wintree... command to the context menu.
  • Quickly find folders that use up the most disk space.
  • Identify folders that are worth compressing (eliminating cluster overhead).
  • Find out how much disk space you would gain by changing the cluster size.
  • Find out how much space a folder/branch would take on another drive with different cluster size (e.g. CDROM).

wintree screenshot

Requirements
  • Windows 9x or Windows NT >= 4
  • Source was compiled on VC 6 (should compile everywhere with small modifications).

Installation
  • Copy/extract to any folder
  • Start WinTree.exe
  • Open "View" - "Options..." Menu
  • Click [Register as Shell extension]

Usage
  • Right click on any file in the Windows File Explorer
  • Choose "Open with WinTree..." or "Send to \ Wintail"