home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware 1 2 the Maxx
/
sw_1.zip
/
sw_1
/
UTILS
/
ZDATE10.ZIP
/
ZDATE.DOC
< prev
next >
Wrap
Text File
|
1992-03-04
|
14KB
|
330 lines
╔═════════════════════════════════════════╗
║ ║
║ ZDATE ║
║ ║
║ "A Compression Program Utility" ║
║ Version 1.0 ║
║ by Clark Waggoner ║
║ 603 S. Adams ║
║ Sapulpa OK 74066 ║
║ 918 227-1611 ║
║ ║
╚═════════════════════════════════════════╝
TABLE OF CONTENTS
Description............................page 2
Quick Start............................page 2
How to Use Output as a
Batch File Variable.................page 3
How to Use Output as an
Environmental Variable..............page 3
ZDATE..................................page 3
Sample Batch Files.....................page 4
Advanced Users.........................page 5
Registration...........................page 6
Use of this product is without warranty of any kind.
All warranties are disclaimed. By using ZDATE.EXE you agree
that Clark Waggoner will not be liable to you or to any other
party for the use of or malfunctioning of this program, or for
any damages whatsoever, including loss of business, profits,
equipment or information, and the like, even if I have been
made aware of the possibility of such damages.
page 1
DESCRIPTION
ZDATE.EXE is a simple utility that captures the system
date and returns it to you in the format required by PKZIP.
The following illustrates this format:
ZDATE = mmddyy (PKZIP)
IN ADDITION, ZDATE.EXE will return any string you enter
on the command line in front of the date. For example,
if on February 20, 1992...
...you would type: C\:>zdate myfile -m -es
...you would get: myfile -m -es 022092
QUICK START
The output of ZDATE must be redirected into a batch file
using the ">" symbol and the name of the batch file.
Example: C\:>zdate myfile > stor.bat
This would write the batch file STOR.BAT, which would consist
of only one line: "myfile 022092" (or current date), quotes not
included.
There are several possible usages of this output. We will
suggest two, both using ZDATE to do super fast incremental
backups.
(1). To call a batch file designed to run the compression
program, and using the command line variable of %1 in place of
"time" option.
(2). To call a batch file setting an environmental variable
including the returned date.
To clarify the explanation process, let us assign names to the
specific batch files used in these procedures. We will then use
these names consistently throughout this document. Of course, you
can use any names you would like.
(1). STOR.BAT - The batch file created by redirecting
ZDATE output as illustrated above.
(2). MYFILE.BAT - The batch file that runs the compression
(1,2, & 3) program.
(3). GETDATE.BAT - The batch file used to run ZDATE.
(4). SETDATE.BAT - The batch file used to set the date in
an environmental variable.
(see page 4 for examples of these batch files.)
We will also arbitrarily use this date and time in all examples:
February 20, 1992.
page 2
HOW TO USE OUTPUT AS A BATCH FILE VARIABLE
Let's examine first the procedure in using ZDATE output
to call MYFILE.BAT.
(1). Do your full backup.
(2). Run GETDATE.BAT once to store the date of full backup
in STOR.BAT.
(3). Do incremental backups by running STOR.BAT (if you use
MYFILE1.BAT) or by running MYFILE2.BAT.
HOW TO USE AS AN ENVIRONMENTAL VARIABLE
The procedure in using ZDATE output to set the environmental
variable is as follows.
(1). Do your full backup.
(2). Run GETDATE.BAT once to store the date of full backup
in STOR.BAT.
(3). Run SETDATE.BAT to set the environmental variable.
(3). You must run SETDATE.BAT before each backup unless
you call it in your AUTOEXEC.BAT.
(4). Do incremental backups by running MYFILE3.BAT.
ZDATE
ZDATE.EXE is designed to return the date in the format of
mmddyy (month-day-year). This format is of the type required by
PKZip compression program. ZDATE will allow you to include any
compression program options you wish and it will include them in
it's output.
Example: Typing: zdate myfile -es -u
will output: myfile -es -u 022092
page 3
EXAMPLE BATCH FILES
(Remarks are for explanation only and not required
for batch file operation, nor do they interfere with
batch file operation.)
(1). STOR.BAT (produced by redirected output of ZDATE).
myfile1 022092 (This command is used to call
MYFILE1.BAT.)
(2). MYFILE1.BAT
@echo off
rem This is MYFILE1.BAT
rem (Remark) Put your compression file command on next line.
pkzip a:newfile *.* -t%1 -u
rem (Remark) where created file is A:NEWFILE.ZIP
rem (Remark) where *.* is all files in current directory
rem (Remark) where -t is the date options (only files
created on or after set date.
rem (Remark) where %1 is the date (always use %1 to read in
the second item on the command line. %2 would
read in a third, etc.
rem (Remark) where -u is the update option
echo Please read above for possible error messages.
pause
:end
(3). MYFILE2.BAT
@echo off
rem This is MYFILE2.BAT
if (%1)==() goto callstor
goto start
:callstor
stor
:start
pkzip... (see above example)
echo Please read above for possible error messages.
pause
:end
(4). MYFILE3.BAT
@echo OFF
rem This is MYFILE3.BAT
if (%bakdate%) == () goto setdate
goto start
:setdate
call setdate
:start
pkzip -u a:newfile -t%bakdate%
echo Please read above for possible error messages.
pause
:end
page 4
(5). GETDATE.BAT
@echo off
rem This is GETDATE.BAT
zdate myfile1 > stor.bat
rem (Remark: The above line could also use zdate, and either
myfile1, myfile2, myfile 3 or setdate.
:end
(6). SETDATE.BAT (to be used with MYFILE3.BAT)
@echo off
rem This is SETDATE.BAT
if (%1)==() goto callstor
goto setdate
:callstor
stor
rem (Remark: STOR.BAT must include "setdate" to be used here.)
:setdate
set bakdate=%1
:end
(7). AUTOEXEC.BAT
To run SETDATE.BAT from your AUTOEXEC.BAT you must:
a. Make sure SETDATE.BAT and STOR.BAT are in directories
in your path.
b. Add the following line to your AUTOEXEC.BAT.
call setdate
Be sure it is after your "PATH" statement.
ADVANCED USERS
Since the variations of batch files are seemingly unlimited,
ZDATE has been left open for as many usages as possible. Anything
you type on the command line after "zdate" will be returned in
it's output. Since DOS allows up to 9 command line variables
and the shift command, it would be possible to call multiple
batch files and/or environmental variables one at a time, all
within the same batch file or in several nested batch files.
You are limited only by your imagination. You could even recall
ZDATE again after one or more procedures have been accomplished.
Have fun, and remember, if you want a date in it, ZDATE will
do the job.
page 5
REGISTRATION
If you use ZDATE and like it, I will give you the second best
bargain around (next to Public Domain).
You can register ZDATE for $3.00, yes $3.00.
Why? you ask? Not because that is all it is worth. It can be
of great value to anyone who makes their own customized backup
procedures.
I ask only for $3.00 because I believe that you will more likely
register at that price than at any other price. Also, I would like to
know if you like it and are using it.
Let's face it, as valuable as it is, it is too small a utility to
command a $25 or $35 price.
But $3.00 is a great deal: A handy program and a clear conscience
besides. And to top it off you have unlimited non-commercial use.
Commercial registration is $5.00 per machine.
┌─────────────────────────────────────────────────────────────┐
│ │
│ ZDATE Registration Form │
│ │
│ Mail to: Clark Waggoner │
│ 603 S. Adams │
│ Sapulpa, OK 74066 │
│ (918) 227-1611 │
│ │
│ Name │
│ ─────────────────────────────────────────────── │
│ │
│ Address │
│ ──────────────────────────────────────────── │
│ │
│ City State Zip │
│ ───────────────────── ─────── ─────── │
│ │
│ Phone │
│ ─────────────────────────── │
│ │
│ # of Non-commercial Registrations @ $3.00 │
│ ─────────── │
│ │
│ # of Commercial Registrations @ $5.00 │
│ ─────────── │
│ │
│ Amount included $ │
│ ───────────────────── │
│ Make checks to: Clark Waggoner │
│ Add $5.00 for copy of latest version. │
│ Orders under $10.00 include SASE if you wish a receipt. │
└─────────────────────────────────────────────────────────────┘
page 6