Return to Glenn's tools page

ListWin

Author: Glenn Story

Download software from here.

General Description

Listwin is a program for listing the contents of an arbitrary file. It can display contents in ASCII or hexadecimal. It can also display line numbers, and show nesting of parentheses, brackets and bracing (useful for programming). Under NTFS it can display named streams within a file. (See Open Stream... for a description of streams.) Finally, all of these features can be directed to printer output.

How to Install Listwin
How to Run Listwin


How to Install Listwin

Follow these steps to install Listwin.
  1. Get a copy of Listwin.ZIP .
  2. Unzip the file into a temporary directory, producing the following files:
  3. Run "SETUP" from the directory into which you have unzipped the files.

NOTE: If you are using WinZip, you can combine steps 2 and 3 by simply clicking "Install" from the WinZip wizard bar in standard mode. In Wizard Mode, WinZip can also perform these steps.

How to Run Listwin

Starting Listwin
Listwin Menus

Starting Listwin

Listwin can be run in one of six ways: The first two methods will start a Listwin session from which you can select one or more files to list. The second two methods open Listwin on a specified file. And the last two methods will print the specified file in ASCII.

Listwin Menus


File Menu
Edit Menu
Display Menu
Other Menus

File Menu

In addition to the standard File-menu commands, Listwin includes the "Open Streams" command. Streams are a feature of NTFS (NT File System) under Microsoft Windows NT 4.0 and Microsoft Windows 2000. Traditionally a file is often conceptualized as a stream or sequence of bytes. NTFS allows a file to contain multiple streams of bytes. (The Macintosh file system contains a similar concept of having two "forks": a resource fork and a data fork; however, the Macintosh file system limits files to two forks whereas NTFS allows n (i.e. an arbitrary number) of streams.)

Every NTFS file has an "unnamed" stream. Listwin displays this stream by default. However, by using the "Open Stream" command on the File menu, you can display a list of streams in a given file and then select a stream whose contents you wish to display.

The "Open Streams" command is not available in Windows 95, Windows 98, or Windows Millenium Edition, since those operating systems do not support NTFS.

The streams feature of NTFS is not widely used (since it is not compatible with other file systems or operating systems). However it is simple to create a multi-stream file in order to demonstrate this capability of Listwin. (If you don't have NT or an NTFS disk, skip to the next section.)

  1. Open a command prompt window.
  2. From the command prompt type the drive letter of an NTFS drive followed by a ":".
  3. From the command prompt, type the following command:
    echo unnamed stream > stream.txt
  4. From the command prompt, type the following command:
    echo named stream 1 > stream.txt:stream1
  5. From the command prompt, type the following command:
    echo named stream 2 > stream.txt:stream2
  6. From the command prompt, type the following command:
    list win stream.txt

Edit Menu

The Edit menu contains, among its other standard commands, a "Find" command that lets you search for text within the file.

Display Menu

The Display menu has the following commands:
Hexadecimal
Offset...
Show Line Numbers
Show Delimiter Counts
Refresh
Set Refresh Interval...
Hexadecimal
The "Hexadecimal" command is a toggle. Select it once and the display will switch from ASCII to hexadecimal. Select it again and the display will switch back to ASCII.
Offset...
The "Offset..." command will allow you to specify the starting position in the file that you would like to display. This is useful to move the display directly to a specified offset within the file. It is also useful for files that are too large to fit into the buffer so that you can move to a portion of the file not currently in the buffer.
Show Line Numbers
The "Show Line Numbers" command is a toggle. Select this command and each line of the display will be preceded by its line number. Select the command again, and the line numbers will be removed.

This command is only available in ASCII mode, not hexadecimal mode. Also, it is only available when the file offset is 0.

Show Delimiter Counts
This command is a toggle. Select this command and each line of the display will be preceded by three counts:
  1. The number of unmatched open parens "(".
  2. The number of unmatched open brackets "[".
  3. The number of unmatched open braces "{".
"Unmatched" means that the open character has been found but its corresponding close character has not.

The display this produces is primarily useful for programmers to find mismatched delimiters in a source program.

This command is only available in ASCII mode, not hexadecimal mode.

Refresh
This and the following command have to do with refreshing the display. "Refreshing" means rereading the file when its contents have changed and displaying the new contents. There are two refresh modes:
Timed Refresh
In this mode, the file is reread every few seconds. (You specify the interval.)
Manual Refresh
In this mode, the file is reread only when you request it.
You select which mode you want using the Set Refresh Interval... command described below.

If timed refresh mode has been selected (which is the default), the "Refresh" command becomes a toggle: selecting the command will start the process of checking the file every few seconds. Selecting the command again will stop the timer and no more checks will be made (until you select "Refresh" again).

In manual refresh mode, selecting the "Refresh" command will cause Listwin to reread the file once looking for changes.

Set Refresh Interval...
This command lets you select whether to use manual or timed refresh mode, and if the latter, at what interval to do the refresh.