home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
arc_lbr
/
arcstamp.arc
/
ARCSTAMP.DOC
next >
Wrap
Text File
|
1988-06-20
|
12KB
|
284 lines
ARCSTAMP
Date/time stamp for archived files
by David Peyton
Version 1.00 (June 1988)
Copyright (c) 1988 by David Peyton
All Rights Reserved
ARC is a trademark of System Enhancement Associates
for its file archive utility.
INTRODUCTION
ARCSTAMP is a utility that will allow you to change the date/time
stamp and, optionally, rename files that are stored within an archive. This
represents considerable savings in time and disk space over having to extract
the files, changing their date/time stamps through the operating system,
renaming them, and adding them back into the archive.
ARCSTAMP also allows the user to specify how the date/time stamp on
the .ARC file itself should be updated, choosing from the two methods in
common use. In addition, it does not maintian a backup copy of the archive
it is processing, so it has the added advantage that even floppy disk users
need not worry about setting aside sufficient free space on disk for ARCSTAMP
to operate.
DISTRIBUTION POLICY
This program is distributed under the shareware concept. All users
of this program are encouraged to make copies for online distribution and for
trial use by others. However, if you find this program of value, you are
asked to register it with the author.
No user may make any monetary charge for the distribution of this
program, or distribute the program and/or its documentation with ANY
modifications without the express written permission of the author. Users'
groups, and distributors of public domain or user supported software
libraries, if they qualify as legitimate, non-profit organizations, are
hereby granted permission to charge their typical handling fee, provided that
this fee does not exceed the cost of media, postage, or other expenses
directly involved in the distribution of this software.
Registration requires a one-time fee of $12 for individuals, or $12
per on-site computer used to run ARCSTAMP in a commercial environment or
governmental organization. Registered users are entitled to receive all
future updates of this program as they become available, either through
normal channels of shareware distribution or directly from the author. All
registration requests should be sent to:
David Peyton
Platt Campus Center
Harvey Mudd College
Claremont, CA 91711
Any questions, comments, suggestions, and/or bug reports are most welcome,
and should also be sent to this address. Registered users will receive first
priority in answering correspondence.
WARRANTY: This program is supplied "as-is." The author makes no warranty of
any kind, express or implied, including without limitation, any
warranties of merchantibilty and/or fitness of this program for a
particular purpose. The author assumes no liability for any
damages, whether direct, indirect, special, or consequential
arising from the use of or inability to use this program or any
modified version thereof, or for any claim by any other party.
COMMAND LINE SYNTAX AND OPTIONS
The format for invoking ARCSTAMP is:
ARCSTAMP [/option] ... [d:][path]archive [filespec] ...
Where:
"/option" is one of two available command switches (see below) used
to control renaming of files within an archive, and how the .ARC file
is to be updated on program termination. Both options may be used at
once, if desired.
"d:" and "path" are the drive and path specifiers for the .ARC file.
If these are omitted, the default drive and path is assumed.
"archive" is the name of the archive file. If no filename extension
is given, an extension of ".ARC" is assumed.
"filespec" is the name of a file contained within the archive. It is
permissible to use more than one such argument. If this argument is
omitted, ARCSTAMP will process all the files contained in "archive."
Invoking ARCSTAMP with no arguments will cause it to display a brief summary
of the command line format.
For every file that it is directed to process, ARCSTAMP will display the
following message:
File [FILENAME] in archive [ARCHIVE]
is dated [Day of week], [dy] [Month] [year]
Enter new date (mm-dd-yy):
The user may enter any date acceptable to DOS in the typical format: mm
being the month number from 1 to 12, dd the day of the month from 1 to 31,
and yy a two-digit number from 80 to 99 (the 19 is assumed) or a four-digit
number from 1980 to 2099 representing the year. The hyphen (-), period (.),
and forward slash (/) are all acceptable separators between the numbers.
Instead of entering a date in full, the following keys may be used as
shortcuts:
F1 - stamps the file with the current date
F2 - stamps the file with the date of the newest file found in the
archive
F3 - stamps the file with the date of the archive file when it was
opened by the program
F4 - ends the program. This provides a much cleaner exit than
Control-C.
Esc - does not stamp the file, but causes the program to continue
processing.
If the date supplied is not valid, or a function key is used that
ARCSTAMP does not recognize, an error message is displayed and the user is
prompted for the date again.
When the date of the file has been stamped, a message will be
displayed indicating the current file time, and prompting for the new time as
(hh:mm:ss). The format for entering times is the same one used by DOS
(identical to military time), where hh represents the hour, mm the minutes,
and ss the seconds. The hour may be one digit if desired, but minutes and
seconds must be two digits each. If seconds are not supplied, "zero seconds"
is assumed. Note that the colon (:) is the only allowable separator between
the digits.
As before, it is possible to use certain keys as shortcuts instead of
entering the time manually, as follows:
F1 - stamps the file with the current time
F2 - stamps the file with the time that is, at that point, the latest
time found in the archive (see below)
F3 - stamps the file with the time of the archive file when it was
opened by the program
F4 - ends the program. Note that if the date has been changed, using
this key will cause the date just stamped not to be saved.
Esc - does not change the file's time, but continues processing the
next file, if there is one, or else ends the program. Using
this key instead of F4 will cause the stamped date to be saved.
If the time is not valid, or a key is used that ARCSTAMP does not recognize,
an error message is displayed and the user is prompted for the time again.
The "latest time" in the archive is defined as the time with the
highest numerical value (on the 24 hour clock) associated with the file with
the latest date. For example, the time 8:25 for a file dated January 16th is
considered to be later than 11:15 for a file dated January 15th. Thus, the
latest time may change as soon as the file dates change.
The two options recognized by ARCSTAMP work as follows:
/R (rename) When this option is specified, the user will be asked
whether the file just stamped is to be renamed. If a
'Y' is entered, the user is then prompted for the new
filename. As in DOS, a filename is 1 to 8 characters
long, plus an optional period (.) and 1 to 3 characters
for an extension. ARCSTAMP accepts only alphanumeric
characters for filenames, and will not allow the user to
give a file the same name as any other file in the
archive.
/U (update) This option will stamp the archive file itself with the
latest date and time found among the files in the
archive when the program terminates. If this option is
not specified, the archive file will be stamped with the
current date and time. (Note: stamping the archive with
the latest date/time of the archive files is the method
used by System Enhancement Associates' ARC program;
stamping the current date and time is used by Phil
Katz's PKARC program.)
WARNING!
The rename option should be used with caution! The ARC program
always stores files in alphabetical order by filename when it creates an
archive, and it assumes that all such archives obey this convention. Thus,
if you have an archive containing the two files ALPHA.TXT and BRAVO.TXT,
renaming ALPHA.TXT to COCO.TXT is asking for trouble. If you later use ARC
to add BRAVO.TXT to this file, ARC will not know any better than to do so
once it sees COCO.TXT as the first file in the archive. The result is an
archive with duplicate files, or at the very least one with duplicate
filenames. Although lack of alphabetical order is not a problem for
extraction, listing, or other ARC functions, if you plan to add files to your
archives in the future, you should take care that the alphabetical order is
preserved.
ACKNOWLEDGEMENTS
The design, coding, testing, and debugging of this program were all
done by me. However, producing a working program is rarely a single-handed
effort, particularly when the program is to work with a specialized kind of
data whose format was designed by someone else. I owe a debt of gratitude to
several others, without whose efforts this program would probably never have
left my computer.
First and foremost, I would like to extend my thanks to System
Enhancement Associates, creators of the original ARC program, for having made
their source code available. I found it to be very helpful in my efforts to
adjust to the C language as I was developing ARCSTAMP.
I also am grateful to Phil Katz, creator of PKARC and PKXARC, for his
technical essay on archive file formats, and for his assistance in helping me
over the worst pitfalls involved in making a program compatible with this
format. Without him, I would undoubtedly have banged my head against the
wall much longer than I did.
Finally, I must single out the anonymous voices at the other end of
Microsoft's language support line for special recognition. I appreciate the
patience of these people as they explained to me some of the idiosyncracies
of C. Their efforts have done a great deal to convince me that their C
compiler was a worthwhile investment in software.
----Dave Peyton
June 1988
AFTERWORD
For those users who would prefer to contact me via E-mail rather than
spending a quarter for postage, the most likely place at which I will find
your message is the Public Domain Software Exchange bulletin board, the
system I log into most often.
Located in Sunnyvale, California, PDSE has two numbers:
408-735-7190 or
408-745-0880
Both these numbers are accessible with PC Pursuit. You should leave your
message in the General section or the Programmers' SIG to ensure that I will
find it.