home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / UTILS / ZDATE10.ZIP / ZDATE.DOC < prev    next >
Text File  |  1992-03-04  |  14KB  |  330 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                    ╔═════════════════════════════════════════╗
  9.                    ║                                         ║
  10.                    ║                 ZDATE                   ║
  11.                    ║                                         ║
  12.                    ║     "A Compression Program Utility"     ║
  13.                    ║               Version 1.0               ║
  14.                    ║            by Clark Waggoner            ║
  15.                    ║              603 S. Adams               ║
  16.                    ║            Sapulpa OK 74066             ║
  17.                    ║              918 227-1611               ║
  18.                    ║                                         ║
  19.                    ╚═════════════════════════════════════════╝
  20.  
  21.  
  22.  
  23.  
  24.  
  25.                                 TABLE OF CONTENTS
  26.  
  27.                   Description............................page 2
  28.                   Quick Start............................page 2
  29.                   How to Use Output as a
  30.                      Batch File Variable.................page 3
  31.                   How to Use Output as an
  32.                      Environmental Variable..............page 3
  33.                   ZDATE..................................page 3
  34.                   Sample Batch Files.....................page 4
  35.                   Advanced Users.........................page 5
  36.                   Registration...........................page 6
  37.  
  38.  
  39.  
  40.              Use of this product is without warranty of any kind.
  41.         All warranties are disclaimed. By using ZDATE.EXE you agree
  42.         that Clark Waggoner will not be liable to you or to any other
  43.         party for the use of or malfunctioning of this program, or for
  44.         any damages whatsoever, including loss of business, profits,
  45.         equipment or information, and the like, even if I have been
  46.         made aware of the possibility of such damages.
  47.  
  48.  
  49.                                      page 1
  50.  
  51.  
  52.  
  53.                                    DESCRIPTION
  54.  
  55.               ZDATE.EXE is a simple utility that captures the system
  56.         date and returns it to you in the format required by PKZIP.
  57.         The following illustrates this format:
  58.  
  59.                         ZDATE = mmddyy        (PKZIP)
  60.  
  61.              IN ADDITION, ZDATE.EXE will return any string you enter
  62.         on the command line in front of the date.  For example,
  63.         if on February 20, 1992...
  64.  
  65.                ...you would type:    C\:>zdate myfile -m -es
  66.  
  67.                ...you would get:     myfile -m -es 022092
  68.  
  69.  
  70.  
  71.  
  72.                                    QUICK START
  73.  
  74.             The output of ZDATE must be redirected into a batch file
  75.         using the ">" symbol and the name of the batch file.
  76.  
  77.                 Example:  C\:>zdate myfile  > stor.bat
  78.  
  79.             This would write the batch file STOR.BAT, which would consist
  80.         of only one line: "myfile 022092"  (or current date), quotes not
  81.         included.
  82.             There are several possible usages of this output. We will
  83.         suggest two, both using ZDATE to do super fast incremental
  84.         backups.
  85.  
  86.                 (1). To call a batch file designed to run the compression
  87.             program, and using the command line variable of %1 in place of
  88.             "time" option.
  89.                 (2). To call a batch file setting an environmental variable
  90.             including the returned date.
  91.  
  92.             To clarify the explanation process, let us assign names to the
  93.         specific batch files used in these procedures. We will then use
  94.         these names consistently throughout this document.  Of course, you
  95.         can use any names you would like.
  96.  
  97.                 (1).  STOR.BAT  - The batch file created by redirecting 
  98.                                   ZDATE output as illustrated above.
  99.                 (2).  MYFILE.BAT - The batch file that runs the compression
  100.                       (1,2, & 3)   program.
  101.                 (3).  GETDATE.BAT - The batch file used to run ZDATE.
  102.                 (4).  SETDATE.BAT - The batch file used to set the date in
  103.                                     an environmental variable.
  104.                 (see page 4 for examples of these batch files.)
  105.  
  106.             We will also arbitrarily use this date and time in all examples:
  107.         February 20, 1992.
  108.  
  109.                                      page 2
  110.  
  111.  
  112.  
  113.  
  114.  
  115.                    HOW TO USE OUTPUT AS A BATCH FILE VARIABLE
  116.  
  117.              Let's examine first the procedure in using ZDATE output
  118.         to call MYFILE.BAT.
  119.  
  120.                 (1).  Do your full backup.
  121.                 (2).  Run GETDATE.BAT once to store the date of full backup
  122.                       in STOR.BAT.
  123.                 (3).  Do incremental backups by running STOR.BAT (if you use
  124.                       MYFILE1.BAT) or by running MYFILE2.BAT.
  125.  
  126.  
  127.  
  128.                      HOW TO USE AS AN ENVIRONMENTAL VARIABLE
  129.  
  130.             The procedure in using ZDATE output to set the environmental
  131.         variable is as follows.
  132.  
  133.                 (1).  Do your full backup.
  134.                 (2).  Run GETDATE.BAT once to store the date of full backup
  135.                       in STOR.BAT.
  136.                 (3).  Run SETDATE.BAT to set the environmental variable.
  137.                 (3).  You must run SETDATE.BAT before each backup unless
  138.                       you call it in your AUTOEXEC.BAT.
  139.                 (4).  Do incremental backups by running MYFILE3.BAT.
  140.  
  141.  
  142.  
  143.  
  144.  
  145.                                       ZDATE
  146.  
  147.             ZDATE.EXE is designed to return the date in the format of
  148.         mmddyy (month-day-year).  This format is of the type required by
  149.         PKZip compression program.  ZDATE will allow you to include any
  150.         compression program options you wish and it will include them in
  151.         it's output.
  152.  
  153.             Example: Typing:  zdate myfile -es -u
  154.                      will output:  myfile -es -u 022092
  155.  
  156.                                   page 3
  157.  
  158.  
  159.                 
  160.                                EXAMPLE BATCH FILES
  161.  
  162.                 (Remarks are for explanation only and not required
  163.                  for batch file operation, nor do they interfere with
  164.                  batch file operation.)
  165.  
  166.         (1). STOR.BAT (produced by redirected output of ZDATE).
  167.  
  168.                    myfile1 022092     (This command is used to call
  169.                                        MYFILE1.BAT.)
  170.  
  171.         (2). MYFILE1.BAT
  172.  
  173.                 @echo off
  174.                 rem  This is MYFILE1.BAT
  175.                 rem  (Remark) Put your compression file command on next line.
  176.                 pkzip a:newfile *.* -t%1 -u  
  177.                 rem  (Remark) where created file is A:NEWFILE.ZIP
  178.                 rem  (Remark) where *.* is all files in current directory
  179.                 rem  (Remark) where -t is the date options (only files
  180.                               created on or after set date.
  181.                 rem  (Remark) where %1 is the date (always use %1 to read in
  182.                               the second item on the command line. %2 would
  183.                               read in a third, etc.
  184.                 rem  (Remark) where -u is the update option
  185.                 echo  Please read above for possible error messages.
  186.                 pause
  187.                 :end
  188.  
  189.         (3).  MYFILE2.BAT
  190.                 @echo off
  191.                 rem This is MYFILE2.BAT
  192.                 if (%1)==() goto callstor
  193.                 goto start
  194.                 :callstor
  195.                 stor
  196.                 :start
  197.                 pkzip... (see above example)
  198.                 echo  Please read above for possible error messages.
  199.                 pause
  200.                 :end
  201.  
  202.         (4).  MYFILE3.BAT
  203.                 @echo OFF
  204.                 rem  This is MYFILE3.BAT
  205.                 if (%bakdate%) == () goto setdate
  206.                 goto start
  207.                 :setdate
  208.                 call setdate
  209.                 :start
  210.                 pkzip -u a:newfile -t%bakdate%
  211.                 echo  Please read above for possible error messages.
  212.                 pause
  213.                 :end
  214.  
  215.                                     page 4
  216.  
  217.  
  218.  
  219.  
  220.         (5). GETDATE.BAT
  221.  
  222.                 @echo off
  223.                 rem  This is GETDATE.BAT
  224.                 zdate myfile1   > stor.bat
  225.                 rem (Remark: The above line could also use zdate, and either
  226.                              myfile1, myfile2, myfile 3 or setdate.
  227.                 :end
  228.  
  229.         (6). SETDATE.BAT  (to be used with MYFILE3.BAT)
  230.  
  231.                 @echo off
  232.                 rem  This is SETDATE.BAT
  233.                 if (%1)==() goto callstor
  234.                 goto setdate
  235.                 :callstor
  236.                 stor
  237.                 rem (Remark: STOR.BAT must include "setdate" to be used here.)
  238.                 :setdate
  239.                 set bakdate=%1
  240.                 :end
  241.  
  242.         (7). AUTOEXEC.BAT
  243.  
  244.              To run SETDATE.BAT from your AUTOEXEC.BAT you must:
  245.                 a. Make sure SETDATE.BAT and STOR.BAT are in directories
  246.                    in your path.
  247.                 b. Add the following line to your AUTOEXEC.BAT.
  248.  
  249.                             call setdate
  250.  
  251.                    Be sure it is after your "PATH" statement.
  252.  
  253.  
  254.  
  255.  
  256.  
  257.                                  ADVANCED USERS
  258.  
  259.             Since the variations of batch files are seemingly unlimited,
  260.         ZDATE has been left open for as many usages as possible.  Anything
  261.         you type on the command line after "zdate" will be returned in
  262.         it's output. Since DOS allows up to 9 command line variables
  263.         and the shift command, it would be possible to call multiple
  264.         batch files and/or environmental variables one at a time, all
  265.         within the same batch file or in several nested batch files. 
  266.         You are limited only by your imagination.  You could even recall 
  267.         ZDATE again after one or more procedures have been accomplished.
  268.             Have fun, and remember, if you want a date in it, ZDATE will
  269.         do the job.
  270.  
  271.  
  272.                                  page 5
  273.  
  274.  
  275.  
  276.  
  277.                                   REGISTRATION
  278.  
  279.             If you use ZDATE and like it, I will give you the second best
  280.         bargain around (next to Public Domain).
  281.             You can register ZDATE for $3.00, yes $3.00.
  282.             Why? you ask? Not because that is all it is worth.  It can be
  283.         of great value to anyone who makes their own customized backup
  284.         procedures.
  285.             I ask only for $3.00 because I believe that you will more likely
  286.         register at that price than at any other price.  Also, I would like to
  287.         know if you like it and are using it.
  288.             Let's face it, as valuable as it is, it is too small a utility to
  289.         command a $25 or $35 price.
  290.             But $3.00 is a great deal: A handy program and a clear conscience
  291.         besides.  And to top it off you have unlimited non-commercial use.
  292.             Commercial registration is $5.00 per machine.
  293.  
  294.         ┌─────────────────────────────────────────────────────────────┐
  295.         │                                                             │
  296.         │                 ZDATE  Registration Form                    │
  297.         │                                                             │
  298.         │            Mail to:  Clark Waggoner                         │
  299.         │                      603 S. Adams                           │
  300.         │                      Sapulpa, OK 74066                      │
  301.         │                      (918) 227-1611                         │
  302.         │                                                             │
  303.         │   Name                                                      │
  304.         │        ───────────────────────────────────────────────      │
  305.         │                                                             │
  306.         │   Address                                                   │
  307.         │           ────────────────────────────────────────────      │
  308.         │                                                             │
  309.         │   City                       State         Zip              │
  310.         │        ─────────────────────       ───────     ───────      │
  311.         │                                                             │
  312.         │   Phone                                                     │
  313.         │         ───────────────────────────                         │
  314.         │                                                             │
  315.         │   # of Non-commercial Registrations            @ $3.00      │
  316.         │                                    ───────────              │
  317.         │                                                             │
  318.         │   # of Commercial Registrations                @ $5.00      │
  319.         │                                    ───────────              │
  320.         │                                                             │
  321.         │   Amount included  $                                        │
  322.         │                      ─────────────────────                  │
  323.         │    Make checks to: Clark Waggoner                           │
  324.         │    Add $5.00 for copy of latest version.                    │
  325.         │    Orders under $10.00 include SASE if you wish a receipt.  │
  326.         └─────────────────────────────────────────────────────────────┘
  327.  
  328.                                   page 6
  329.  
  330.