COPSINCE.TXT                         1                         Aug 25, 1999

WIN95 AND WINNT NOTICE:  As with most  DOS-based  utilities,  this  program
doesn't  understand  the  weird  subdirectories,  long  filenames,  invalid
characters that  are  possible  under  Windows  95  and  Windows/NT.   Both
operating systems alias long filenames into names like MYFILE~1.TXT and you
will need to specify the aliased versions of file names to process them. If
you're not sure what the pseudo-name is, use the "DIR /X" command in DOS to
check.  Under some file structure systems in NT, the program may  not  work
at all.

This program looks for all files in a particular  subdirectory  and  copies
all new ones to another subdirectory.  It is typically used  to  make  sure
you have backups of files while you're in the middle of doing something  to
them.  Features:

  * You can copy all files updated since a given date or  within  the  last
    x-number of days.
  * You  can  specify  that  newer  files  be  copied  regardless  of  date
    restriction as  long  as  the  older  version  already  exists  in  the
    subdirectory.
  * You can define groups of file types, using DOS wildcard  specifications
    and copy only, say, text files or word processing files.
  * Pressing escape stops the program early.


Defining your own file specifications:

You  can  create  your  own  file  specifications  for  copying   purposes.
Typically, this is done using an *.INI file (see BRUCEINI.TXT file) but  it
can also be done from the command line.

These definition specifications are made using the following syntax:

        /DEF filetype=filespecs

For example, if you want to specify a new grouping "WP", you can define  it
to include something like the following:

        /DEF WP=*.WP *.WP5

Up to 20  file  specifications  can  be  made  for  a  given  group.   Your
COPSINCE.INI file can contain up  to  10  groupings.   Once  the  group  is
defined, you can then specify the name of the group on the command line and
those are the files that will be grabbed.  By default, only two file  types
are defined and you can override both of these if desired:

        /DEF ALL=*.*
        /DEF TEXT=*.BAS *.BAT *.BI *.C *.DOC *.H *.REF *.TXT

Win95 notice:  As with  most  DOS-based  utilities,  this  program  doesn't
understand the weird subdirectories and filenames that are  possible  under
Windows 95.


COPSINCE.TXT                         2                         Aug 25, 1999

When are files copied or moved:

COPSINCE has five action  parameters  that  are  mutually  exclusive  which
determines which (if any) files get copied or moved:

 /DIFF   says to copy any files which are different in size, creation date,
         or time as well as any files which  don't  already  exist  in  the
         destination subdirectory at all.

 /A      says to only copy files to the destination  subdirectory  only  if
         they are not currently there.

 /U      says to only copy files to the destination  subdirectory  if  they
         are newer in the source subdirectory.

 /AU     says to copy files if they  are  either  not  in  the  destination
         subdirectory or they're more recent in the source subdirectory.

 /CLONE  says to copy everything no matter what.

The following table may help explain this:

File in         File in                         Copy?
Source sub      Destination sub       /DIFF  /A    /U    /AU  /CLONE

Newer           Older                 YES    no    YES   YES  YES
Older           Newer                 YES    no    no    no   YES
One size        Another size          YES    no    no    no   YES
Present         Missing               YES    YES   no    YES  YES
Same            Same                  no     no    no    no   YES

If /OBEY is in effect, files are only copied if  the  file  in  the  source
subdirectory was created within the number of days specified in the  "/COPY
date" or "/COPY -n" parameter.


Specifying parameters:

Parameters for this program can be set in the  following  ways.   The  last
setting encountered always wins:
  - Read from an *.INI file (see BRUCEINI.TXT file),
  - Through the use of an environmental variable (SET COPSINCE=whatever),
    or
  - From the command line (see "Syntax" below)



COPSINCE.TXT                         3                         Aug 25, 1999

Syntax:

    COPSINCE [ [ /FROM ] from_dir | from_dir\filespec ] [ /TO to_dir ]
      [ /COPY date | /COPY -n ] [ /DIFF | /A | /U | /AU | /CLONE ]
      [ /-OBEY ] [ /DEF filetype=spec [ spec ]... ] [ /ALL | /TEXT |
      /filetype ] [ /-4DOS ] [ /BEEP ]
      [ /MONO ] [ /Iinitfile | /-I ] [ /-ENV ] [ /? ]

where:

"/FROM from_dir" (or just "from_dir") is the subdirectory name in which the
source files are found.  Can provide drive and path information if desired.
Defaults to the current subdirectory.  Alternatively,  you  can  specify  a
filespec including wildcards to limit the activity to one group  of  files.
If you  specify  a  filespec,  it  overrides  any  /ALL,  /TEXT,  /filetype
specifications.

"/TO to_dir" (or just "to_dir") is the destination to  which  to  copy  the
files.  Can provide drive  and  path  information  if  desired.   Initially
defaults to "/TO=A:\".  The equal sign is optional.

"/COPY date" (or "date") specifies the date from which you want  all  files
copied.   Initially  defaults  to  today's  date   (for   example,   "/COPY
06-23-96").  The date should be in whatever national date format  you  have
set for your computer.

"/COPY -n" (or "-n") says to copy all files updated in the last n-number of
days.  Initially defaults to "/COPY -0"; all files created today only.

"/DIFF" says to copy files from the source subdirectory to the  destination
subdirectory if it either doesn't exist in the destination subdirectory  or
its file date, time, or size is different.  This is initially the  default.
The following parameters are all mutually exclusive:  /DIFF, /A,  /U,  /AU,
and /CLONE.

"/A" adds new files only to the  destination  subdirectory.   If  the  file
exists already in the destination subdirectory, it  will  be  skipped  over
whether it's newer or not.   The  following  parameters  are  all  mutually
exclusive:  /DIFF, /A, /U, /AU, and /CLONE.

"/U" says to copy files only if  they  exist  already  in  the  destination
subdirectory and only if the files  in  the  destination  subdirectory  are
older than the ones in the source subdirectory.  The  following  parameters
are all mutually exclusive:  /DIFF, /A, /U, /AU, and /CLONE.

"/AU" copies the file if the version in  the  destination  subdirectory  is
either missing or older than the one in the source subdirectory.  Note that
"/UA" is treated the same as  "/AU".   The  following  parameters  are  all
mutually exclusive:  /NONE, /DIFF, /A, /U, /AU, and /CLONE.

"/CLONE" says to copy all files from directory1 to directory2.  Period. The
following parameters are all mutually exclusive:  /DIFF, /A, /U,  /AU,  and
/CLONE.


COPSINCE.TXT                         4                         Aug 25, 1999

"/OBEY" says that if the file exists already in  the  output  subdirectory,
the "/COPY date" or "/COPY -n" specification is to be strictly adhered  to.
This is initially the default.

"/-OBEY" says that if the file exists already in  the  output  subdirectory
and is older there than it is in the input subdirectory, ignore the  "/COPY
date" or "/COPY -n" specifications and update it anyway.  This  makes  sure
that  the  files  are  current  even  when  they're   outside   your   date
specification.  The initial default is "/OBEY".

"/DEF  filetype=spec  [  spec  ]"  allows  you  to  create  your  own  file
specifications.  Typically, this would be specified in your initfile.   See
"Defining your own file specifications" above.

"/ALL" says to take all files (initially, a file specification of *.*).

"/TEXT" restricts copying to only those files that are known to be straight
ASCII files.  Initially, this is defined as any files which meet any of the
following file specifications:

        *.BAS *.BAT *.BI *.C *.DOC *.H *.REF *.TXT

Initially, the routine grabs the /TEXT specification by default.

"/filetype" allows you to invoke your own file  specification.   You  might
want to have something like /WP (for *.WP *.WP5  etc  files)  or  whatever.
Unless you're referencing /TEXT or /ALL though,  you  have  to  define  the
filetype using a /DEF filetype statement  before  using  it;  the  relevant
"/DEF filetype=spec" parameter must appear before the "/filetype" parameter
in the *.INI or command-line or *.INI file or whatever.

"/4DOS" says to respect 4DOS conventions vis-a-vis the  DESCRIPT.ION  file.
File descriptions from the DESCRIPT.ION file in the input path are added to
those (if any) in the DESCRIPT.ION  file  in  the  output  path.   4DOS  is
copyrighted by  Rex  Conn  and  JP  Software  Inc.   The  COPSINCE  program
initially determines whether 4DOS is loaded or not and acts  appropriately.
The "/4DOS" switch says to force 4DOS adherence whether it's loaded or not.

"/-4DOS" says to ignore 4DOS conventions vis-a-vis the  DESCRIPT.ION  file.
Initially, the conventions are  ignored  only  if  4DOS  is  not  currently
loaded.

"/BEEP" gives you a beep when the program finishes.  Initially defaults  to
"/-BEEP".

"/-BEEP" does not beep when the program finishes.  This  is  initially  the
default.

"/MONO" (or "/-COLOR") does not try to override screen  colors.   Initially
defaults to "/COLOR".

"/COLOR" (or "/-MONO") allows screen colors  to  be  overridden.   This  is
initially the default.


COPSINCE.TXT                         5                         Aug 25, 1999

"/Iinitfile" says to  read  an  initialization  file  with  the  file  name
"initfile".  The file specification *must* contain a period.  Initfiles are
described   in   the   BRUCEINI.TXT   file.     Initially    defaults    to
"/ICOPSINCE.INI".

"/-I" (or "/INULL") says to skip loading the initialization file.

"/ENV" says to look for %var% occurrences in the command line  and  try  to
resolve any apparent environmental variable references.   See  BRUCEINI.TXT
for more information.  This is initially the default.

"/-ENV" says to skip resolving apparent %var% occurrences  in  the  command
line.  Initially defaults to "/ENV".

"/?" or "/HELP" or "HELP" shows you the syntax for the command.


Return codes:

COPSINCE returns the following ERRORLEVEL codes:

        0 = no problems
      250 = operation aborted by pressing Escape
      255 = syntax problems, or /? requested


Author:

This program was written by Bruce Guthrie of Wayne Software.   It  is  free
for use and redistribution provided relevant documentation is kept with the
program, no changes are made to the program or documentation, and it is not
bundled with commercial programs or charged  for  separately.   People  who
need to bundle it in for-sale packages must pay a $50 registration  fee  to
"Bruce Guthrie" at the following address.

Additional information about this and other Wayne Software programs can  be
found in the file BRUCE.TXT which should be included in  the  original  ZIP
file.  The recent change  history  for  this  and  the  other  programs  is
provided in the HISTORY.ymm file which should be in the same ZIP file where
"y" is replaced by the last digit of the year and "mm"  is  the  two  digit
month of the release; HISTORY.611 came out in  November  1996.   This  same
naming convention is used in naming the ZIP file  (COPSymm.ZIP)  that  this
program was included in.

Comments and suggestions can also be sent to:

                Bruce Guthrie
                Wayne Software
                113 Sheffield St.
                Silver Spring, MD 20910

                e-mail: WayneSof@erols.com   fax: (301) 588-8986
                http://www.geocities.com/SiliconValley/Lakes/2414
             or find through http://www.erols.com/waynesof

Please provide an Internet e-mail address on all correspondence.


