










           ͻ                        
                                                     
                                                     
           ͼ  ͻ   ͹              
                                                      
                                                      
                    ͼ                




                               Version 2.9



























                        (c) Hans Paijmans 1991, 1992


















PSHELL (KSHELL)

Copyright Hans Paijmans 1991

NOTA BENE

PSHELL is also called KSHELL and under that name is used at Tilburg
University. The only difference is a different Icon and a different
welcome-screen.
So if you are using it at the KUB, just read KSHELL when it sez
PSHELL here.

DISCLAIMER

All the usual disclaimers go here: use PSHELL at your own risk and
don't come wailing to me if bugs in the program eat your disk, your
computer and your pet canary. As far as I know there are no dangerous
bugs in PSHELL and I certainly did not put a virus in it. Please read
the copyright notice: althoug not too many strings are attached (pun
not intended), this program is not public domain.

Comments and suggestions are always welcome as are bottles with beer!
See address below. (Must see the first dutchman yet who sends a
bottle of beer for what he can have for free!).


DIRECTIONS OF USE

PSHELL was born from the conviction that ten fingers and a keyboard
are better tools to perform typical housekeeping-tasks on the PC than
mice and other pointing devices.

Also I am addicted to 4DOS, the well-known alternative for
COMMAND.COM from JP Software and many of my directories have
4DOS-descriptions attached. Alas!  none of the command-line shells
for WINDOWS, that I have seen, seems to support them.

So I wrote another command-line shell for MS-WINDOWS, but one that
should be able to read the 4DOS DESCRIPT.ION-files. But  I wondered
why not try out a few other enhancements, that I always miss in shells?
Therefore there are quite a few original niceties in PSHELL that are not
even in 4DOS, let alone in DOS itself.

Note the four different ways of copying files. Besides COPY and MOVE you
have BAC and UPDATE, both based on the DOS date-time stamp. BAC copies
both new versions of files already existing in the target-directory AND new
files, i.e. files that do not yet exist in the target. UPDATE only
updates files in the target directory but does NOT add new files.
And note how PSHELL handles full disks...


Also rather original (at least I like to think so) is the
INDES-command, that lets you manipulate files according to strings in
their file-descriptions.

And of course you MAY point your mouse at files and execute them by
pressing a button. If you have a list of extension-application pairs,
PSHELL will automatically load the application if you point at a datafile
(or type the name+extension at the prompt).


Put PSHELL.EXE and PSHELL.HLP somewhere in your path. If you decide to
like PSHELL, add a line like

      RUN = E:\BIN\PSHELL.EXE

in WIN.INI and it will be around when WINDOWS awakens. If you find you
are not using the regular program manager so much any more, you can change
the line

      SHELL=PROGMAN.EXE

in SYSTEM.INI into

      SHELL=PSHELL.EXE

thus freeing up the memory space used by the old PROGMAN. You can
always activate PROGMAN from the Pshell-command-line. You can use the
4PSHELL.PBT to automatically run other programs when starting Windows.
Even better: you can give the name of any PBT-file on the command line
when starting a new PSHELL, e.g. WIN STARTUP, whete STARTUP.PBT is a
batch-file.
*********************************************

Use of PSHELL.INI is discontinued from PSHELL 2.09 onwards. WIN.INI
is used from then on to store PSHELL data.

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


Use the HELP-command to learn about the commands. A synopsis is given
below, but I keep adding things and forgetting about them later. Most
DOS-commands that you have become used to in the last ten years
should be in PSHELL, so just try them out.







SHORT TOUR of PSHELL

PSHELL does not cover *all* 4DOS-commands, switches and parameters.  It
reflects those functions that I use regularly, but there are many
very sensible functions that are not in PSHELL, because I do not
happen to need them. Tell you what: send me a bottle of Belgian beer
and I'll add them in for you.

To gain an immediate feel for what PSHELL may do for you, do the
following:

0. Copy PSHELL.EXE, PSHELL.TXT and PSHELL.HLP somewhere in your PATH.

1. Run PSHELL from windows (e.g. WIN PSHELL from the DOS-command line or by
   launching it from the WINDOWS program manager).
   
*****************************************
Discontinued from version 2.09 onwards. Extensions from WIN.INI
will be used. The EXT-command will only be used to check the
extensions.

2. Type the PSHELL-command

       EXT TXT NOTEPAD

   (for NOTEPAD use your favorite editor. This will tell PSHELL that files
   with the extension TXT should be used with NOTEPAD.
   
*****************************************

3. Type DIR and observe the familiar DOS directory scrolling by.

4. Move your mouse-pointer to PSHELL.TXT (or any other TXT-file and
   doubleclick on that filename.

5. If everything is all right (and NOTEPAD.EXE is in your path), NOTEPAD
   should start with PSHELL.TXT as file.

Nifty, isn't it? If you like this trick, go on reading this manual. If not,
go and install X-Windows or some similar interface.

DOS and MS-WINDOWS.
                    Most commands may be typed on the
   PSHELL-commandline to start execution, just as you used to do when
   in 'normal DOS'.  This works for BAT-files and PIF-files too.  The
   DOS path-environment is copied to PSHELL and expanded when
   searching for an executable file.  If one is found, first a CHDIR
   to that directory is executed. This might cause some
   'where-is-that-darned- file-I-see-it-right-here-but-he-doesnt!'
   feelings, but you'll get over it. This only happens if the
   batch-file is on a different drive and a filename is given as a
   parameter to that batch-file.  Just remember to add the
   drive-letter if you give filenames as parameters to batch-files.

   Also there are batch-files for PSHELL, with the extension of .PBT.
   They are found and executed *before* regular BAT-files.


command line editor:
                    ^E, ^X, ^S and ^D double as Up-arrow,
   down-arrow, left and right. ^A and ^F as HOME and END.
   Up and Down cycle through the history list. Left, Right, Home and
   End move in the command-line. Insert (Ctrl-V) toggles insert and
   changes the cursor in the bargain.
   Note that clicking the mouse on a word inserts that word in
   the comamnd-line. But if the mouse gets clicked on the command-line,
   the cursor just changes position.

   TAB, F9 and F8 may be used to cycle through the directorylist.
   TAB cycles through all files, beginning with the
   characters already typed AND shown in the last DIR operation.
   Note that the path-prefix is not kept in memory, so you have to
   type it yourself.

   F9 cycles through all files, beginning with the characters
   already typed, but reads the directory anew.
   F8 cycles backwards.
  E.g.:
   After DIR \PATH\*.BAK you may use a command like
     DEL \PATH\ab<TAB>
   to cycle through all files in \PATH, beginning with ab and with
   the extension .BAK.
     DEL ab<F8>
   however, reads your default-directory and cycles through all
   files that start with ab.

The caret (^) may be used to combine several commands on the
   command line. E.g.:

   COPY *.* B: ^ DEL *.BAK ^ CHKDSK C:

Support is added for the excellent WINBATCH batchprocessor for Windows
   from Morris Wilson. A shareware version can be downloaded from any
   well-equipped BBS. Just put WINBATCH and the batchfile (extension
   WBT) somewhere in your path. Of course WINBATCH will nag you for
   registration every first time you use it in a session. I will nag
   you for a bottle of beer, every time you read this. And if Morris
   Wilson reads this, he may send me a registered copy of his programs.

BATCH-files.
                  It had to come: PSHELL now has batchfiles of its own.
  Just use ASCII-files with the extension .PBT.
  Currently supported are:

   ECHO on|off|messagestring
   REM
   PAUSE message
   9 parameters (%1 .. %9)
   IF parameter == string .... (mind the spaces around the == !)
              also eq, ne, gt, lt, le, ge
              and EXISTS filename
   GOTO label
   :label

  NOTA BENE: As we said PSHELL searches PBT before the BAT-extension.
  Therefore you may use identical names, e.g. SEARCH.PBT and SEARCH.BAT as
  below for the same tasks under WINDOWS and DOS.
  E.g.: a textfile like this:

   PUSHD C:\
   WHERE %1
   CDD D:\
   WHERE %1
   POPD

  Which (assuming 4DOS and the existence of a filefind-command for DOS,
  called WHERE.COM) would either use PSHELL-commands under WINDOWS and
  4DOS-commands under 4DOS,  but execute transparently.
  An 'autoexec' is possible, which executes automatically whenever a
  new copy of pshell is started. It is called '4PSHELL.PBT' and may be
  anywhere in the path. You may give other PBT-files on the commandline
  when starting new PSHELL's or when firing up WINDOWS itself.

  A PBT-batchfile should have at least one empty line at its end!

  NOTA BENE: if a normal DOS-batch-file conforms to the PSHELL-syntax
  (that is a subset of DOS), you may use it as a PBT-file, just by adding
  an exclamationmark.
  So the command
      SEARCH!
  will execute the SEARCH.BAT inside PSHELL (without shelling to DOS)
  if no SEARCH.PBT is found.
  Alternatively the command BAT ON may be given.

MOUSE
  The mouse in PSHELL may be used to click with the left button on a
  string somewhere in PSHELL's window. That string will be inserted in the
  command-line, complete with slashes and points (only spaces will
  separate string). Useful to pick up a long path after a WHERE-command
  and put it in the command-line, or to start applications from a
  directory.
  Doubleclicking the left button will select the string and immediatly
  launch it.
  Singleclicking the right button will insert spaces in the command-line
  and doubleclicking the right button will also launch the command-line.

  NOTE: in the commandline itself, and only in the commandline, the
  mouse may be used to position the cursor.

  If you really are lazy you may click the left button on the prompt as
  substitute for arrow-up (previous command in history) and the right
  button on the prompt as arrow down.

  CALIBRATION
  If the mouse does not 'hit' the right spot, you may adjust the
  'pixeloffset'- parameters in the PSHELL.INI file. The values 12 and
  5 work just fine on my screen.


EXTENSIONS
 
 *********************
 from version 2.09 the WIN.INI extensions will be used
 *********************

ALIASES
  Pshell has room for 25 aliases of 40 chars each. The first part
  (the alias itself) can be no longer than 5 characters; the
  expansion is maximal 40 long.
  Aliases consist of a single word and do not accept parameters.
  They are expanded only if they are typed as a single word on the
  command-line after the prompt or read from a PBT-file.
  Aliases beginning with % are treated as systemvariables (see
  below). Remove aliases by adding a minus sign in front.

SYSTEM VARIABLES
  Pshell knows a number of system variables. They have the general
  form %qxyz (the procent is obligatory).
  
    %_BAT     returns ON or OFF (see command BAT).
    %_CWD     current drive and directory in the format d:\directory
    %_DATE    current date in the format yyyy-mm-dd
    %_YESTERDAY the yesterday-variable (see commands).
    %_TIME    current time in the format hh:mm:ss
    %_DISK    current disk as character (e.g. C )
    %_DOW     day of the week (mon, tue, wed etc.)
    %_SYSDIR  Windows systemdirectory (e.g. C:\WINDOWS\SYSTEM ).
    %_WINMODE returns ENHANCED, STANDARD or REAL.

  Aliases that consist of % followed by no more than four
  characters are treated as system variables.
  System variables are used in IF- and ECHO-statements.



SHORT LIST OF COMMANDS.

------> Refer to the Help-function of PSHELL if the following is not
  clear. ALso the excellent HELP of 4DOS might clarify many things,
  which is invoked by typing:

4HELP
  Invokes 4DOS help, if it exists somewhere in your path and has the
  name HELP.

ALIAS [[-][alias "expansion]]
  Without parameters: displays list of aliases.
  With parameters in the form ALIASNAME=EXPANSION creates an alias
  with that meaning. The double quote is obligatory if the expansion
  has spaces or slashes inbedded.
  e.g.:

     ALIAS dw "dir *.bak /w

  Use the minus sign to remove aliases

     ALIAS -dw

  which removes that alias from the list.

BAC source [destination]
  Works like COPY, but only copies new files and
  files, which are younger than the files on the destination drive.
  
BAT [ON][OFF]
   BAT ON enables the execution of all BAT-files as PBT-files. BAT OFF
   switches this option off. BAT without parameters shows the current status.
   BAT ON acts as if all BAT-commands are followed by an exclamation mark.
   The status of BAT will be kept in the INI-file.

BEEP [integer]
   Look, you're not gonna believe this, but it beeps.
   And if you add a number it beeps many times!

CHDIR, RMDIR, MKDIR dirname
   work as expected (by me, that is). Of course the
   shorter forms CD, MD and RD are also supported.

CDD d:dirname
   changes both path and disk.

CLS
   clears screen.

COPY source [destination]
   may be used and changes will be reflected in the descriptions.
   Switches like /V, /B, /A etc.  not supported at the moment (I
   never used them anyway.  Note that both 'COPY CON filename' and
   'COPY filename PRN' work as expected.
   Of course COPY allows you to change disks if one gets filled.

DEL filename
  Deletes file.

DESCRIBE filenaam [Description]
  will enable the user to add 4DOS descriptions to files in the
  directory. Wildcards are allowed. The description string may be
  entered on the command-line: in this case start it with double
  quotes if more than one word.

DIR [dirname] [switch]
  Displays directory. Default is sorted on name or according to PSHELL.INI.

 /w - for wide display.
 /a - displays attributes in stead of comments.
 /e - sort on order of entry (like DOS)
 /t - sort on time.
 /s - sort on size.
 /d - sort on description.
 /n - sort on name.

EXCEPT (filespec [filespec....]) command filename ...
  (one of that 4DOS-goodies) Just put filespecs
  inside parenthesis and give a disk-command.
     e.g.
     EXCEPT (*.EXE *.COM) COPY *.* B:
  It works by first setting the attributes of the files
  between the parenthesis on HIDDEN and READONLY, executing
  the command and setting the HIDDEN and READONLY off again.
  NOTE: files of that filespec, which were hidden or read-only
  to begin with, are changed to NOT hidden and NOT readonly!

EXIT [/S].
  To kill the 4PSHELL just type EXIT on the command-line. Another way
  is clicking left upper corner (as with all windows applications).
  EXIT /S causes the current parameters of prompt, directory-sort and
  screen to be saved in a PSHELL.INI, which resides in C:\.

EXT [[-] [ext filename]]
  To check which extensions are enabled for auto-execution.
  
FIND filespec string
  Searches files for an occurring string. Returns filename or both filename
  and lines in which the string occurrs. Use /I to Ignore case, /F if you
  only need the filename. Pshell adds the search-string to every filename,
  so you will not forget what you asked.

FREE D:
  displays free space and total capacity on disk.

GLOBAL
  Executes an internal command over all directories under the default.
  Try 'GLOBAL DEL *.*' to get the general idea. (NO!  Don't take me serious!).

HELP [keyword]
  starts WINDOWS help-system on PSHELL. (Also F1). You may add a
  keyword that you want help on.

HISTORY
  displays last fifteen commands entered.

INDES[i] "string" command filename...
  The command INDES has been added, which enables the selection
  of files which have a certain string in their 4DOS description-part
  (INDES is case-sensitive, INDESI is not).  So

     INDES "foobar" DEL *.BAK

  means "delete all *.bak-files with 'foobar' somewhere in the
  description.  and

     INDES NOT "foobar" DEL *.bak

  means "delete all *.bak-files, except those with 'foobar' somewhere
  in the description...
  Try it! It effectively makes the filenames 40 characters longer!

INI
  Saves INI-file without having to use EXIT/S.

KILL processnumber.
  Kills the window with that processnumber. See the warning under PS!

KD dirname
  Which means 'KillDir'. KD recursively deletes all files
  and directories under and inclusive the given directory.

LOAD command
  Loads and minimizes a windows-program as an Icon.

MAX processnumber
  Maximizes the window with that processnumber

MEMORY
  displays free RAM-memory.

MIN processnumber
  Minimizes the window with that processnumber

MOVE source [destination]
  Like COPY, but deletes files in the source-directory after copying
  them.  If within a drive, a 'rename' is done, which is MUCH faster.

NEW [filespec]
  Looks for files, newer than 'yesterday', where yesterday is the
  last time NEW was executed. That date is stored in the PSHELL.INI
  in the [checknew] section, so you will have to execute NEW at least
  one time 'blind'.

PUSHD dirname
   Pushes the current directory on a stack and does a CD to dirname.

POPD
  reverses PUSHD: i.e. a directory name is popped off the stack
  and a CD to that directory is executed.

PROMPT
  Behaves more or less as the DOS prompt-command.  The prompt is
  saved to PSHELL.INI when quitting PSHELL with EXIT /S
  Prompt accepts a string, which may end with a number of
  $(character) combinations.  These characters are

   $   The $-sign itself.
   _   The underscore inserts a carriage/linefeed
   d   The current date
   e   The ASCII escape character.
   g   The > sign
   l   The < sign
   n   default drive letter
   P   Path in uppercase
   p   path in lower case
   s   The space character

A string may be placed before the first $-character.
Example
          PROMPT This is an idiotic prompt$_$t$s$P$g

will create the following prompt:

          This is an idiotic prompt
          12:02:11 D:\\PSHELL>

PS
  Gives a list of active windows with processnumbers.
  NOTA BENE: The processnumbers are not static, but change after minimizing,
  maximizing and other actions. Always do a PS immediatly before using
  KILL, MIN, MAX or REST.

REDIRECTION
  Use > and >> as in dos. The first creates a new file and directs
  Pshell-output in it; the second appends it after an existing file.

REN filename1 filename2
  Renames files (wildcards allowed). Changes will be reflected in
  the descriptions.  Parameters not supported at the moment.

REST processnumber
  Restores the window attached to the process to its original size.

SET
  may be used to examine DOS environment variables (not to SET them!)

STOP[!]
  Quits WINDOWS without first having to discuss it with
  the progam manager. You have to enter 'Y' in uppercase to confirm.
  STOP! quits Windows without confirmation (you might have to close
  some open WINDOWS-applications by hand).

TREE
  displays tree of directories under current directory.

TYPE filename
  and LIST are identical. They support wildcards. Press ESC to
  cancel the typing of the current file, ctrl_C to quit.
  S to stop scrolling, any key to start again.
  I know it's slow, but you may scroll back too.

    /S added to TYPE and LIST. It suppresses weird characters and
       adds CR/LF's, so that you may TYPE executables and other
       non-ASCII-files.
    /c - switch added to TYPE to add CR to lines, which don't have
       one.
    /W trims bit 8 (useful for some wordprocessor-files).

UPDATE source [destination]
  added, which works somewhat like BAC; copies only younger files
  over older files, but does not add new files.

VER
  Displays the version numbers of PSHELL, MS-DOS and MS-WINDOWS.

WHERE filenaam.
  Searches default disk (under the current subdirectory) for file(s)

YESTERDAY [yyyy:mm:dd]
  Lets you give the date to use as 'yesterday' in the NEW-command.
  Sorry, it doesn't check for correctness and you have to give it
  as yyyy:mm:dd, or it won't work.
  Also exit PSHELL with EXIT /S to store it in the INI-file, because
  subsequent NEW will reset that date to the current date.



COPYRIGHT NOTICE

Although everybody is invited to copy PSHELL for private use, the
program is NOT public domain.
 
*********************************************************************

The management of the cica.indiana.edu site in Berkeley, USA, forced me
to retract a statement in this place, in which I forbade racists,
fascists, criminals etc., to use my software. I guess they wanted to use
it too.

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

If you are using PSHELL on a regular basis, please send me (voluntarily)
say 50 US dollars, or 75 Dutch guilders or Deutsche Mark or something
like that. You 'll get a registered version without the Bromberg-notice.
If you became curious it has served its purpose.


Giving this program away for free in a package deal, in which
other products are sold, is considered commercial use and is explicitly
prohibited without written permission from me. Just keep thinking
"OK, so this guy made something. How would I like to be treated
if I were in his place?"

If somebody wants to use my program commercially, just contact me.
We will work out something.

Suggestions and donations are welcome at

Hans Paijmans
Elzenstraat 1
5183 VS Waalre
Holland

email: PAAI@KUB.NL (bitnet).


