		 jNDIR - The Ultimate Color Directory Program
			       v1.00

                              Written by:
                         Daniel D. Miller
                         4835 Coco Palm Drive
                         Fremont, CA  94538

                 Email: derelict@comcast.net
		 Web:	http://home.comcast.net/~derelict/ndir_info.html

				and

			    Jason Hood

		 Email: jadoxa@yahoo.com.au
		 Web:	http://jndir.adoxa.cjb.net/

The NDIR utility is released as Freeware, though I retain the copyrights 
on all included programs.  Please feel free to distribute it anywhere that 
you wish!!  This package may be included freely in CDROM and online
archives, as long as all included files are retained in the package.

***************************************************************************

                        NDIR - The directory lister.

This program is a color directory lister with many options.  In addition
to the standard file-display options, it also offers special display
options to:

   ->  Display drive summaries for all disk drives in your system
   ->  Display a complete, recursive directory tree that shows summary
       information for all subdirectories on a drive.  *NO OTHER*
       color directory lister shows as much information in the TREE
       view as NDIR does!!
   ->  Batch mode: enables user to create batch files from lists
       of filenames in a directory.

***************************************************************************

                                Installation

The only installation required by NDIR is to place *.EXE and NDIR.INI
somewhere in your path, so they can be located when you run them from
a Command Prompt.

***************************************************************************

- Program configuration

Ndir is now configured via a configuration file, called NDIR.INI.  
*All* of the executables use the same configuration file.  A default INI
file is included with this distribution; I recommend copying the INI file and
the appropriate executable files to a directory that is in your path. 
C:\WINDOWS (or C:\WINNT) should work fine.

When NDIR first executes, it searches for NDIR.INI.  The search method is:

1. search the current subdirectory

2. If not found, search the directory where the executable file was located.

3. If still not found, create a default NDIR.INI in the location where the
   executable file was located, and then load that file.

One advantage of this search method is that you can have a default file with
your normal settings, but if you want "special handling" in a certain 
directory, you can make a copy of the INI file there, and put different 
settings in it.  For example, you might want /2 normally, but want /6 in 
directories with many files.  NDIR.INI lets you easily do this!!

***************************************************************************

                Handling System/Hidden/Readonly files

NDIR can now display S/H/R files with a background color selected by
the user.  The foreground color is determined by the file attribute,
with the BRIGHT bit set, and a background color which is specified
by the user.  The following table lists the foreground colors for various 
file attributes:

        S  H  R         foreground color
      =================================================
        0  0  0      determined by file extension
        0  0  1      Bright Blue
        0  1  0      Bright Green
        0  1  1      Bright Cyan
        1  0  0      Bright Red
        1  0  1      Bright Magenta
        1  1  0      Bright Brown (Yellow)
        1  1  1      Bright White

***************************************************************************

         WHAT DOES NDIR DO THAT EVERY DIR LISTER DOESN'T ? ?

Here are some of the features of NDIR, a summary of which can be
obtained by typing jNDIR -? :

- Long-filename support (MSDOS 7.00+ and NTFS)

- FAT32 and NTFS support.

- Configuration via INI file(s).

- Full color file display.

- List executable files only (.BAT, .COM, .EXE, .CMD, .BTM)

- Full control over display format 
  (pause-on-full-screen, clear-screen-before-listing, 
   select number of columns and amount of file info shown).

- File exclusion (list all files EXCEPT *.ult, for example).

- Full directory TREE, showing size of current directory
  as well as current directories PLUS subdirectories.

- Show ALL files, including hidden and system files.

- A "batch" mode which can assist you in creating batch files.


     WHAT DOESN'T NDIR DO THAT EVERY DIR LISTER DOES OR DOESN'T ? ?

Functions that are NOT supported (because I ran out of time before other
projects developed), but may be added if interest is shown, are:

- Compressed FAT32 drives are not reported correctly.  This will be added 
  if anyone tells me they are using disk compression; with huge disks so 
  cheap, I'm assuming nobody is paying the performance penalty.

- Support for global subdirectories; i.e., search for files across all
  subdirectories under current default. The framework for implementing 
  this is in place, but it would take a fair amount of work to finish 
  it, and I'm waiting to see if anyone cares.

- Anything else that I didn't think of, and nobody's requested.

***************************************************************************

NDIR Command-Line switches
--------------------------

This is a list of the command-line switches supported by NDIR.
This list can also be obtained by typing 'jNDIR /?'

USAGE:	jNDIR <filespecs> -options or /options
 
 OPTIONS                      FUNCTIONS
   -a *     List all files (include hidden and system).
   -aATTR   Match attributes (use -a? for help).
   -c *     Clear screen before listing.
   -cN	    Specify columns for redirected output (40 to 500).
   -p *     Pause on full screen.
   -m *     Minimize size of header and footer.
   -w *     Use special colors for system/hidden/readonly files.
   -d[1]    Dir Tree: normal size display (work with -s, -n (default), -r).
   -d2	    Dir Tree: file/directory counts
   -d3	    Dir Tree: mixed size and file/directory counts.
   -, *     Dir Tree: show only one level of subdirectories.
   -n	    Sort by name.
   -e	     "   by extension.
   -s	     "   by file size, smallest first.
   -t	     "   by date, oldest first.
   -z	     "   by directory order (no sort).
   -r *     Reverse normal sort order.
   -rN	    Specify rows for vertical file listing (0=maximum, 1=screen,
	       negative will remove the dividing line).
   -1	    Display one column,   with name/size/date/attr.
   -2	       "    two   "   ,   with name/size/date.
   -3	       "    three "   ,   with name/size/mmYY.
   -4	       "    four  "   ,   with name/size.
   -6	       "    six   "   ,   with name only.
   -#FMT    Specify the format to display (use -#? for help).
   -oN	    Date/Time display: 0=Last Write, 1=Last Access, 2=File Created.
   -i *     Display drive summary for all drives in system.
   -l *     Toggle long-filename enable flag.
   -k *     Toggle color mode.
   -kID     Select files matching color or ID (see NDIR.INI).
   -j *     Use standard ASCII (for redirection).
   -u *     List short filenames in UPPERCASE.
   -x *     List executables only (.EXE,.COM,.BAT,.CMD,.BTM).
   -g *     List directories first.
   -h *     List files horizontally.
   -q *     Group files by extension.
   -f *     List files only (no directories).
   -b *     Batch mode; one file per line, suitable for a batch file.
   -?	    Display help screen.
   -??	    Display filespec help screen.
 
NOTE: items with a * after the flag are TOGGLES
 
***************************************************************************
                     
NOTES on using command-line switches:
-------------------------------------
NDIR's functionality can be modified in three ways:

1. Type NDIR <options> as documented above.

2. Modify the NDIR.INI file as required.

3. Specify options using the NDIR environment variable.

***************************************************************************

Notes on using Color mode (-k) :
--------------------------------
Color mode is turned off when output has been redirected.  However, if you
specify it anyway, output to a file will be as HTML and output to a pipe
will use ANSI escape sequences.

***************************************************************************

Notes on using Batch mode (-b) :
--------------------------------
The purpose of batch mode is to assist you in creating batch files.
The output from NDIR in batch mode is a single-column list of the 
requested filenames, with no other information.

Let's look at some examples of NDIR batch-mode commands.
Assume that the following files are in the current subdirectory;

NDINSTAL.C          NDINSTAL.EXE
NDIR.C              NDIR.DOC
NDIR.EXE            NDIR.HLP
NDIR.TXT            NDIRMOD.C
NDIRMOD.EXE         NDIRSRC.BAT
NDIRZIP.BAT         NUPDATE.BAT

Here are some sample commands and their outputs:
------------------------------------------------

   jNDIR -B *.BAT

This will list all BAT files, in single-column, with no other information.
The output looks like:

ndirscr.bat
ndirzip.bat
nupdate.bat

------------------------------------------------

   jNDIR -B *.TXT *.DOC -#"PRINT #f" >printit.bat

The output from this command will be a list of all DOC and TXT files,
preceded by "print ", and these lines will be written to a file 
called PRINTIT.BAT .  The contents of PRINTIT.BAT will be:

print ndir.doc
print ndir.txt

------------------------------------------------

   jNDIR -B *.EXE *.BAT -#"COPY #f B:" >copyexec.bat

This will list all EXE and BAT files, preceded by 'copy ' and followed by ' b:'.
The output of NDIR will be written to COPYEXEC.BAT.
The output:

copy ndinstal.exe b:
copy ndir.exe b:
copy ndirmod.exe b:
copy ndirsrc.bat b:
copy ndirzip.bat b:
copy nupdate.bat b:

***************************************************************************

Jason Hood, 28 December, 2005.
