A - Sub v4.1b - Description
==========================

     Sub is THE utility every experienced hard-disk users need!
     
     Sub is an extended "DIR" command, an extended "WHEREIS" and an
extended "WHAT TO DO" program for a POWERFUL hard-disk management.
It can be used menu driven, from DOS prompt ("C:\>") or command wyse 
for batch files use. 

     Sub can LIST, DELETE, COPY, MOVE, TYPE, RENAME, change ATTRIBUTES,
stamp DATE-TIME and even build BATCH files or EXECUTE sub-programs.

     You can select files by FILENAMES (a powerful name selection with 
multi-drives, multispecs, double-wild cards and exclusion list), 
ATTRIBUTES (full control on it, really more than DOS gives, including 
network "Shareable" attribute), DATES and SIZES.
ÿ
     Sub searches those files in a given directory and in children 
directories.  Sub can even search or list *.ARC files and de-arc the 
files you need!  Compression modes up to "Squashing" (PKARC) are 
supported.

     You can enter your selections with menus and prompts (enter 'Sub /?'
at DOS prompt) or fully describe you request at the DOS prompt.  An expert 
switch will eliminate confirmation prompts if needed to build powerfull 
batch files.  

     If you call Sub with menu option ('Sub /?'), simply answer a few
questions and Sub starts working.  Some options are only available from
DOS command line but you should not need them at the beginning.

ÿ
B - Sub v4.1b - Syntax
======================

B.1 - Command line
------------------
Syntax 'Sub [[drives:]\subdirectory\]filenames[/exclusion] [options] [/?]'

(Note: '[]' indicate optional parameters and must NOT be entered with
 the command.)

   'drives': drives to scan, eg: 'C:' or 'CDE:'.  The default is the
     current drive.
   
   'subdirectory': top directory to scan from.  With default setting, Sub 
     scans this top directory and every children directories.  The default 
     directory is the current directory '.\'.  To scan every directories
     on a drive, specify the root directory '\' as top directory.
ÿ
   'filenames': files to scan.  Wild cards are allowed.  The default is all 
     files ('*.*').  Multiple filenames (eg: '*.COM+*.EXE+*.BAT') are 
     allowed.  A pattern with double-wild cards like '*PAT*.*' is allowed, 
     returning all files with "PAT" somewhere in this part of the filename 
     (eg: "PATTERN.TXT" and "XPATH.COM").
   
   'exclusion': a list of files to exclude can be specified after a slash
     (eg: '*.*/*.NOT').  Exclusion filenames follow the same rules than
     'filenames' (multiple names and double-wild cards).  By default, there
     is no exclusion.
     
   'options': listed below.  Begin with a slash '/' and must be separated 
     by at least one <space>.

ÿ
B.2 FILESPECS EXAMPLES
----------------------
    '\' for all files in every directories of the current drive.

    'C:' all files down from the drive C:'s current directory.

    '\DIR\*.COM' files ending with '.COM' down from '\DIR'.

    '*XYZ*.*' files with the pattern "XYZ" anywhere in the left part 
    of the name down from the current directory.

    '*.BAT+*.SYS' files ending with '.BAT' or '.SYS' down from the
    current directory.

    '*.*/*.COM+*.EXE' for all files except files ending with '.COM' or
    '.EXE' down from the current directory.

    '\*.BAT/AUTOEXEC.BAT' all batch files except the autoexec batch file
    in every directories of the current drive.

    'CDE:\*.SYS' for files ending by '.SYS' on drives C:, D: and E:.

ÿ
C - OPTIONS
===========

     There are four types of options described in the following pages.
     
 C.1 the MENU option:
     '/?' to call a set of questions about your request.
     
 C.2 the SELECTION option:
     Restrict or expand the effect of the filespecs regarding to file's 
     attributes, date and size, including or excluding *.ARC files, listing 
     *.ARC files content (verbose) and limitation to the top directory.
     
 C.3 the DOS COMMAND options:
     One main option, '/DOS' calls a menu to LIST, DELETE, COPY, MOVE, TYPE, 
     RENAME, change ATTRIBUTES, DATE-TIME, build BATCH files and EXECUTE sub-
     programs.  Those commands can be specified from prompt with '/DOS:xxx'.
     
 C.4 the DISPLAY options:
     Affect the way Sub presents its data to screen or printer if redirected
     by DOS (e.g.: 'Sub *.* >PRN').

ÿ
C.1 MENU OPTION
---------------
C.1.1 	MENU	Access to Sub's MENU.
Default OFF
Syntax 	'/?'
Notes		The questions should not need more explanation after you
                read the option's descriptions below.
                You can mix DOS prompt parameters and menu answers.
E.g.		'Sub /S /?' (you will see "/S" later).

ÿ
C.2 SELECTION OPTIONS
---------------------
C.2.1	ATTR	To specify file's ATTRIBUTES selection        
Default	'/A:DOS:RAN'  The files must have one of the "Read Only", "Archive" 
	or "No Attribute", but not have "Hidden", "System", "Volume", 
	"Directory", "Reserved" or "Arced" attributes.  This is the 
	way DOS handles attributes.ÿ
Syntax  '/ATTR:Kind:Attrs' or '/A:Kind:Attrs' 
	Kind	'DOS' or 'D'(*)	File must have one of the attributes not more.
		'ONE' or 'O'	File must have ONE of the attributes or more.
		'MATCH' or 'M'	File must MATCH all the attributes (not more).
		'ALL' or 'A'	File must have ALL the attributes (or more).
		(*): 'DOS' is the standard way DOS handles attributes.
	Attrs	'R' Read Only	'H' Hidden	'S' System
		'V' Volume	'D' Directory	'A' Archive
		'6' Reserved-6	'7' Reserved-7	'N' No Attribute
		'K' Arced file (file included in an *.ARC file)
	Notes	The attribute "Reserved-7" indicates a "shareable" file under
		some network program (like Advanced NetWare /286).  
		"Reserved-6" does not have known use.
Special	'/ATTR:ANY' or '/A:ANY' will return files of any attribute(s).
E.g.	'/ATTR:ALL:RHS' display DOS system files
	'/ATTR:ONE:A'	display files modified since last backup
ÿ
C.2.2	DATE	To list files with a given date selection
Default No selection
Syntax	'/FROM:...' '/OF:...' '/UPTO:...' or '/F:...' '/O:...' '/U:...'
	where "..." is:
        	'date': for files "from", "of" or "upto" a date (see "date")
          	'date+x': for files "of" a date and "x" days after that date.
          	'date-x': for files "of" a date and "x" days before that date.
          	'TODAY': for files "from", "of" or "upto" today.
          	'TODAY-x': for files "of" today and "x" days before today.
        where "date" is: 
        	'YYmmmDD' where 'YY' is the year, "mmm" the month (three 
            	letters) and "DD" the date.  The month can also be specified 
            	with a number from 1 to 12 between brackets (eg: "88(4)11").  
Notes	If month is "xxx", the date is "80xxx00".  In 'mmmDD', the year 
        is the current year.  The word 'TODAY' can be used to specify the 
        current year, month and date. 
E.g.    '/FROM:88feb16'	files of February 16 1988 and after
	'/UPTO:88jan1'	files of January 1 1988 and before
	'/OF:TODAY'	files of today today (according to system's date)
	'/OF:TODAY-7'	files of today and a week before
ÿ
C.2.3	EXCLUSIVE  To scan exclusively files arced in *.ARC files.
Default	OFF
Syntax	'/EXCLUSIVE' or '/E'
Notes	See '/INCLUDE'
E.g.	'Sub /E *.DOC' to list only *.DOC files nested in an *.ARC file.
ÿ
C.2.4	INCLUDE	To include arced files (those inside *.ARC) in scanning.
Default	OFF
Syntax	'/INCLUDE' or '/I'
Notes	See '/EXCLUSIVE'
E.g.	'Sub /I *.DOC' to list *.DOC files normal and nested in an *.ARC file.
ÿ
C.2.5	SIZE	To list files with a given size selection
Default	No selection
Syntax	'/FROM:...' '/OF:...' '/UPTO:...' (or '/F:...' '/O:...' '/U:...')
	where '...' is:
		'size': for files "from", "of" or "upto" a size (see "size").
		'size+x': for files "of" a size and "x" kb bigger.
		'size-x': for files "of" a size and "x" kb smaller.
	where "size" is:
		'xxxK', where "xxx" is a number of kilo-bytes from 0 to 
		65535 ("1k" include files from 1 byte to 1024 bytes).
E.g.	'/FROM:354K'	files of 354k and bigger (361,473 bytes to ...)
	'/UPTO:100K'	files of 100k and smaller (0 to 102,400 bytes)
	'/OF:0K'	files of 0k (0 byte)
	'/OF:100K+50'	files of 100k up to 150k (101,377 to 153,600 bytes)
ÿ
C.2.6	TOP	To scan only the top directory (current directory).
Default	OFF	Scan from current (parent) directory down to the lowest one.
Syntax	'/TOP' or '/T'
ÿ
C.2.7	VERBOSE	To scan only inside arc files specified on the command line.
Default	OFF
Syntax	'/VERBOSE' or '/V'
Notes	Works like "ARC -V *.*" command.  Do not comfuse with '/INCLUDE'
	which cause scanning arced files as is they were sub-directories.
	With '/VERBOSE', hunted files (those specified on the command line) 
	are arced files but the action specified is taken on files arced 
	inside those hunted arc files.
E.g	'Sub /V *.ARC /D:T' to type the content of files arced in *.ARC
	'Sub /V CD:\*.*/*.ARC' to list the content of arc files hidden under
	another extension than .ARC on drives C: and D: from their root
	directory.

ÿ
C.3 DOS OPTIONS
---------------
C.3.1 	MENU	Access to Sub's MENU
Default OFF
Syntax 	'/?'
Notes		You can mix DOS prompt parameters and menu answers.
E.g.		'Sub /R /?' (you will see "/R" later).
ÿ
C.3.2	/DOS	To call one of those DOS commands: change file's 
        	Attribute, make a Batch, Copy a file, Delete a file, 
        	Execute a sub-program, Jump to a directory, Move a file, 
        	Rename a file, Stamp file's date-time or Type a text file.
ÿ
Syntax '/DOS' to call a menu (additional questions will be asked according 
		to the selected function) or
	'/DOS:command:parameter' or '/D:command:parameter' to call a 
		specific command

C.3.2.1	'/DOS:ATTR:x' or '/D:A:x'
		To change ATTRIBUTE, "x" is the attribute to change 
		(see "/A" for attributes list), 'x' alone to toggle 
		attribute "x", to '+x' set "x" ON, '-x' to set "x" OFF.  
		More than one attribute may be changed (eg: '/D:A:-A+R').
ÿ
C.3.2.2	'/DOS:BATCH:command' or '/D:B:command'
		To make a batch file named "BATCH.BAT" in the current 
		directory (if this file exists, you can escape, overwrite 
		or append), "command" is written in that file with the 
		following substitutions: 
                	'~P' 	for file's path (including ending '\') or 
                         	arc file's path\filename for arced files 
                    	'~F' 	for filename (only the part before ".")
                   	'~E'	for file's extension (only the part after ".")
                    	'~R' 	for <return>
                    	'~S' 	for <space>
                    	'~~' 	for "~"
                    	'~nnn' 	for the char of code ASCII "nnn" ("nnn" 
                    		values from 0 to 255 (use it for chars that 
                    		cannot be specified directly at the DOS 
                    		command line: '~60'='<' '~62'='>' '~124'='|')ÿ
		E.g. for normal files:
                	"TYPE~S~P~F.~E~124MORE~RPAUSE~R" for
                    	"TYPE \DIR\FILENAME.EXT|MORE<return>PAUSE<return>"
                E.g. for arced files:
                    	"ARC~SE~S~P~S~F.~E~R" for 
                    	"ARC E \DIR\ARCFILE.ARC FILENAME.EXT<return>"
                Notes	If a batch include sub-directories relative from
                    	the current directory (e.g.: ".\..."), this batch 
                    	file should only be called from the same directory.
ÿ
C.3.2.3	'/DOS:COPY:dir\name' or '/D:C:dir\name' 
		To copy the file to directory "dir" under the name "name".
		E. g.	"Sub *.EXE /D:C:C:\DIR\*.BAK
		        Will copy the files with extension "*.EXE" in the 
		        current directory (and sub-directories) to the 
		        directory "C:\DIR\" with the new extension "*.BAK".
		Notes	A file cannot be copied into itself.  If the 
		        directory is not specified, the file is copied to 
		        the current directory of the specified (or current)
		        drive.  If the name is not specified, the file is 
		        copied with the same name.
ÿ
C.3.2.4	'/DOS:DELETE' or '/D:D' 
        	To delete the file.
ÿ
C.3.2.5	'/DOS:EXECUTE:command' or '/D:E:command'
		To execute sub-program with a "command" written following
		the same syntax seen for BATCH command.  In this case, for 
		each file found, Sub stops its execution and gives the 
		control to the "command".  After the sub-program's execution,
		Sub resumes from where it stopped.  More than one command may
		be called for each file if the "command" string include more
		than one command delimited by '~R' for <return>.  The last
		'~R' is not needed.
		E.g.:  	"Sub /D:E:PROGRAM~S~P~F.~E~RPAUSE~R" for
                    	"PROGRAM \DIR\FILENAME.EXT<return>PAUSE<return>"
		Notes:	Use this feature with care.  You may prefer the BATCH
			command because it gives you a chance to review the 
			batch file before execution.
ÿ
C.3.2.6	'/DOS:JUMP' or '/D:J'
		To exit Sub and jump in the current file's directory.
ÿ
C.3.2.7	'/DOS:MOVE:dir' or '/D:M:dir'
     		To move the file to directory "dir". 
ÿ
C.3.2.8	'/DOS:REN:name' or '/D:R:name'
      		To rename the file with name "name" (wildcards "*" and "?" 
      		in "name" will not replace original filename's chars). 
ÿ
C.3.2.9	'/DOS:STAMP:YYmmmDD:HH:MM:SS' or '/D:S:...'
        	To stamp to the file the date "YYmmmDD" and the time 
        	"HH:MM:SS". "MM" and "SS" are replaced by "00" if ommited.
ÿ
C.3.2.10 '/DOS:TYPE' or '/D:T'
        	To type the file.  Special case: when it reads an ASCII 
        	character 255, Sub skips the end of the line and forces a 
        	page-break prompt.  After the prompt, Sub clears the screen 
        	and homes the cursor if an ANSI compatible screen driver is 
        	installed.
		Notes: to insert an ASCII character 255 in a text file,
        	press and hold the ALT key while you press 2, 5, and 5,
        	then release the ALT key.  At this time, the char 255 is 
        	inserted.  If it does not work with ALT, press and hold
        	ALT+LeftShift instead of ALT.
ÿ
Notes	Only "BATCH", "COPY", "JUMP" and "TYPE" are available for Arced 
	files.  Use "COPY" to extract a file and "TYPE" to read a text file 
	and decide after if you keep or delete it.
E.g.	'/DOS:MOVE:\MEWDIR'	to move files to "\NEWDIR"
	'/DOS:REN:NEWNAME'  	to rename files to "NEWNAME"
	'/DOS:ATTR:-A"		to turn archive attribute off

ÿ
C.3.3	UPDATE	To overwrite without confirmation if source is more recent
Syntax	'/J' (sorry, '/U' is used for "/UPTO")
Default	OFF
Notes	Only for Sub's experts (AT YOUR OWN RISK!!).  See "/XPERT".
ÿ
C.3.4	WRITE	To overwrite without confirmation
Syntax	'/WRITE' or '/W'
Default	OFF
Notes	Only for Sub's experts (AT YOUR OWN RISK!!).  See "/XPERT".
ÿ
C.3.5	XPERT	To avoid any prompt (Sub executes without confirmation)
Syntax	'/XPERT' or '/X'
Default	OFF
Notes	Only for Sub's experts (AT YOUR OWN RISK!!).  See "/WRITE".

ÿ
C.4 DISPLAY OPTIONS
-------------------
C.4.1	BRIEF 	For BRIEF display (only d:\dir\filename)
Default OFF
Syntax	'/BRIEF' or '/B'
Notes	With BRIEF OFF, Sub displays number, date-time, size, attribute, 
	drive, directory and filename.
ÿ
C.4.2	CONT	For CONTINOUS display (disable page break)
Default OFF
Syntax	'/CONT' or '/C'
Notes	See "/PAGE"
ÿ
C.4.3	HELP	To read this help file.
Default	OFF
Syntax	'/HELP' or 'H'
ÿ
C.4.4	LINE	To force linefeed while scanning
Default	OFF
Syntax	'/LINEFEED' or '/L'
Notes	Use it when redirecting output to printer or file and when an
        ANSI compatible screen driver is not installed.
E.g.	'Sub /L >PRN'
ÿ
C.4.5	PAGE	To change the page length, Sub stops every 'nn' lines.
Default	24 lines
Syntax	'/PAGE:nn' or '/P:nn' where 'nn' is in the range 1 to 65535.
Notes	Use it for EGA and VGA.  See "/CONT".
ÿ
C.4.6	QUIT	To abort with <Ctr-C> or <Ctr-Break> instead of <Escape>.
Default	OFF	Abort with <Escape>.
Syntax	'/QUIT' or '/Q'
Notes	When <Escape> checking is enabled, keyboard input cannot be buffered.
        But, by hitting <Ctr-Q>, you can disable <Escape> checking and allow 
        keyboard buffering.
ÿ
C.4.7	REPORT	To display only the Report (number and total size of files).
Default	OFF
Syntax	'/REPORT' or '/R'
Notes	If '/REPORT' is used with DOS commands, you may wish to enable the 
	expert and the overwrite options.  See "/XPERT" and "/WRITE"..
ÿ
C.4.8	SILENT	For silent scanning (directory scanned is not displayed).
Default	OFF
Syntax	'/SILENT' or '/S'

ÿ
D - Sub v4.1b - Technical Info
==============================

     Sub uses standard PC/MS-DOS functions (version 3.0 or later).  For
correct screen handling, "ANSI.SYS" (or compatible drivers like "NANSI.SYS" 
or "FANSI.SYS") must be specified in "CONFIG.SYS" file ("DEVICE=ANSI.SYS"). 
The file "ANSI.SYS" must reside in your boot directory with "CONFIG.SYS".
If an ANSI driver is not installed, add the parameter '/L' to force 
linefeeds.

     Sub supports redirected output (e.g.: "Sub /L /C >output.txt").  
Input and output can also be redirected to a modem or a serial port by a 
communication or network program.
ÿ
     Sub is provided with the "Program Information File" required to run
under Microsoft Windows.  "SUB.PIF" has been created with Windows v2.03.  
You can modify this file to fit your needs.

     Permanent parameters can be specified in your environment.  You can
type at DOS prompt or include in your AUTOEXEC.BAT: 'SET SUBSPEC=/x /x...'
where "/x /x..." are one or more parameter(s) that will be assumed each time 
you call Sub.

     For example, with "SUBSPEC=/C /Q" in your environment, the command 
'Sub *.TXT' will be considered as "Sub /C /Q *.TXT".  You can toggle a 
permanent parameter: with "SUBSPEC=/C /T", the command 'Sub *.TXT /P:24 /T'
will be considered as "Sub *.TXT /P:24".  The "/C" and "/T" in "SUBSPEC" 
are overwritten (or toggled) by "/P:24" and "/T" in the DOS command.

     Sub v4.1a is written in LOGITECH MODULA-2 Compiler, DOS, Rel. 3.00, 
Aug 87, Copyright (C) 1983, 1987 LOGITECH, using Logitech's library and my 
own library JLModules v1.6.  ARC is Copyright 1985 by System Enhancement 
Associates.  PKARC is Copyright (c) 1986,1987 PKWARE, Inc.

ÿ
E - Sub v4.1b - Credits (c) Jean Lalonde
========================================

     This program can be distributed freely if it is done without profit.
Fell free to send me some money if you like Sub.  Modula-2 sources of this 
program and of JLModules are available.  To receive those text files, please 
send me a $25 check.  Buying the sources gives you the right to modify the 
program for your own use.  Please, send comments,  bug reports or sources 
order (with check or money order to Jean Lalonde) at the following address:

          Jean Lalonde
          6667, de Normanville
          Montreal, Quebec
          CANADA
          H2S-2B8
ÿ
     You can join me online on Compuserve (ID: 76606,671).  Many thanks to 
James Bach and Maxime Gousse for their support since the very first 
releases of Sub.

Enjoy Sub!

Jean Lalonde
August 1988
