# LSX v1.40 - extension sensitive directory lister

#### Revised 7-Sep-97. Copyright (c) 1996-97 by Rune Berg. TextTools Freeware.

Usage - Description - Example - Options - Limitations - Return codes

### USAGE

lsx [log logfile] [options] [directory]

### DESCRIPTION

lsx is an alternative directory lister, for directories with many files with the same basename(s) but with different extensions, for example directories containing C programming projects.

By default, lsx recognizes the extensions .h .c .obj, but is configurable (see -x option) to any set of 1-10 extensions.

lsx writes directory contents to standard output.

lsx writes error messages to standard error (or logfile, if given).

### EXAMPLE

For example, if the current directory contains:

            TRANS.C
            TCOLS.OBJ
            MAKEFILE
            TCOLS.C
            TROWS.C
            EVAL.H
            TREE.H
            TREE.OBJ
            PARSER.OBJ
            TRANS.OBJ
            TESTCOLS (dir)
            TESTROWS (dir)
            EVAL.OBJ
            PARSER.C
            TROWS.OBJ
            EVAL.C
            TRANS.H
            PARSER.H
            TREE.C

then the command:

            lsx -f -d

prints the following:

            EVAL     .H .C .OBJ
            PARSER   .H .C .OBJ
            TCOLS       .C .OBJ
            TRANS    .H .C .OBJ
            TREE     .H .C .OBJ
            TROWS       .C .OBJ
            MAKEFILE
            . (dir)
            .. (dir)
            TESTCOLS (dir)
            TESTROWS (dir)

### OPTIONS

lsx recognizes the following command line options:

Option | Function
--- | ---
-x=ext/ext/... | Set (up to 10) extensions to be recognized. (Don't include . in extensions.) For, say, a directory with a C++ Windows programming project, you could use the command:
            lsx -x=h/cpp/obj/rc
-f | Also list files that don't have sought extensions.
-d | Also list directories.
-r | List read-only files in red, others in green.
-l | List all file names in lower case.
-u | List all file names in upper case.
-v | Print version banner and usage info to standard error (or logfile, if given), then exit.

### LIMITATIONS

lsx handles directories of up to 1000 entries.

The DOS version of lsx doesn't display long file names properly; the Win32 version does.

To use the -r option:

lsx requires a colour display.

If you're running the DOS version of lsx, the ANSI.SYS driver must be loaded. If not already present, add the following line (typically) to your "config.sys" file:

            DEVICE=C:\DOS\ANSI.SYS

If you're running the Win32 version of lsx, no special setup is necessary.

### RETURN CODES

lsx returns with one of the following codes ("error levels"):

Code | Meaning
--- | ---
0 | Success
101 | Out of memory
102 | Incorrect command line arguments
104 | Error opening file
105 | I/O error
106 | Capacity overrun
107 | File name clash
110 | Failed to get standard output handle

##### End of document