PushFile: File Archiving Program, Version 1.00
          (C)Copyright, James H. Coombs, 1986


Use the  PushFile  command  to systematically rename files  that  are  obsolete.
PushFile provides the voluntary equivalent of the automatic archiving of VAX/VMS
and similar  systems.   Whenever  you are about to edit a file and don't want to
lose the current version,  just  "push"  the  current  version  onto the archive
stack.

The syntax of the PushFile command is:

+----------+-------------------------------------------------------------------+
|          |                                                                   |
| PushFile | filespec [filespec [...]] [-c] [-path]                            |
|          |                                                                   |
|          | Examples:  PushFile milton.scr                                    |
|          |            PushFile milton.scr words.scr -d:\obsolete             |
|          |            PushFile *.c                                           |
|          |                                                                   |
+----------+-------------------------------------------------------------------+


Operands:

filespec  is  any  valid  DOS file specification,  consisting  of  drive,  path,
          filename, and file extension.  More than one file can be pushed on the
          same invocation.  Moreover,  wild  cards  are  accepted.   In  the box
          examples, the first would rename 'milton.scr'  to  'milton0.-sc'.  The
          second  would  move  'milton.scr'   to  'd:\obsolete\milton0.-sc'  and
          'words.scr'  to 'd:\obsolete\words0.-sc'.   The  third  example  would
          rename all 'c' files in the current directory.


Options:

-c        specifies that the files should be copied instead of renamed.  This is
          especially useful if you are about to edit a file  and  do not already
          have it in an editor.  Note that the copy option is used automatically
          if the files are to be moved to another drive.

-path     specifies a drive and/or directory to move the files to.  If the drive
          is not the current drive,  the  files  will be copied and then deleted
          from the original unless the copy option has been specified.


Using the PushFile Command:

PushFile provides a first-level  solution  to  the  general problem of archiving
versions  of files on  a system  that  does  not  provide  automatic  archiving.
Voluntary archiving is actually preferable on limited storage  systems; but some
systematic  archiving facility is necessary to prevent loss of data.  Systematic
use of PushFile overcomes the frustration of  wishing  that  one  still had that
version that. . . .


Usage Notes:

1.  Naming conventions--stack simulation
    The PushFile "stack" is identified by two naming conventions:

    a.  The file extension begins with the character '-'.  This character should
        not be used for any but pushed files.  Since '-' is low in the collating
        sequence,  pushed  files  come out all together and at the top of sorted
        directory listings (ascending sequence by type, a la LISTIT).

    b.  The file name ends in a version number, beginning with 0.

    When a file is pushed onto the stack,  it  receives  the  version  number 0,
    which  is  suffixed  to the current name truncated to seven characters.   In
    addition,  '-'  is  prefixed  to  its extension, which is truncated  to  two
    characters.   Thus,  'milton.scr'  becomes  'milton0.-sc',  and 'pushfile.c'
    becomes 'pushfil0.-c'.

    As more  files are pushed onto the stack, each file already on the stack has
    its version number incremented  by  one  until  PushFile finds a free "slot"
    (which  occurs  if  a file  in  the  middle  of the stack has been removed).
    Filenames  are  truncated as necessary to retain the full version number and
    stay within the DOS limit of  eight characters.  Thus, 'milton0.-sc' becomes
    'milton1.-sc'  and  'pushfil9.-c'  becomes 'pushfi10.-c'.  Fileid collisions
    should not become common until the ninety-ninth version.

2.  Pushing pushed files:
    PushFile  automatically  recognizes  files that are already on the stack and
    does not attempt to push them onto a nested stack.  Pushed files will simply
    be pushed down one version  number.  This provides a safe means for moving a
    stack  from  the  current  directory  to another directory;  if  the  second
    directory already contains a stack, the files moved into that directory will
    be placed at the top.

3.  Copying:
    The copy  option  has  been  provided  as  a convenience and  has  not  been
    optimized in this version.  Large  files may take some time, but the results
    are still safer than  using  the  DOS  Copy command.  Optimization will take
    place as demand dictates.

4.  Moving:
    Only one target  directory  may  be specified per invocation.  If the target
    directory  is  not  on  the  current  drive,  the  files are copied and then
    deleted, one by one.


Responses:

PushFile  displays  each filespec at the left margin as it begins to process it.
Following lines contain  the ids for each file processed if wild cards have been
used in the  filespec.   As  each  file  already on the stack is pushed down one
slot, PushFile  displays  a '.'.   Finally,  the  input  and  output fileids are
displayed for each newly pushed file.


Version history:

1.00 - 03/14/86 - Initial release.
t  and  output fileids are
displayed for each newly pushed file.


Version history:

1.00 - 03/14/86 - In