home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 12
/
AACD12.ISO
/
CDTools
/
VersionCopy
/
VersionCopy.readme
< prev
next >
Wrap
Text File
|
2000-08-03
|
3KB
|
81 lines
Short: Copy files with version check
Author: Chris <chris@worldfoundry.demon.co.uk>
Type: util/cli
Version: 2.0
License: GNU GPL
TEMPLATE
VersionCopy FROM/A,TO/A,QUIET/S,BUF=BUFFER/K/N,CLONE/S,DATE/S,COM/S,NOPRO/S,IGNORENAME/S
FUNCTION
VersionCopy is a cut-down "Copy" command which is aware of the version information
within the file being copied. Before copying the source file it checks whether the
destination already exists and, if it does, the version numbers of the source and
destination are compared. The source is only copied over the destination if the
source version or revision is greater than that of the destination. Unlike Copy,
wildcards and directory copy are not supported - indeed these facilities would be
somewhat meaningless for the applications this command is intended.
ARGUMENTS
FROM/A The name of the source file. Note that wildcards and directories
are not supported.
TO/A The name of the destination. If this is a directory or volume name
then the filename part of the FROM is used (ie:
VersionCopy foo:bar/fred ram:
will result in ram:fred being written if required)
QUIET/S If specified, any error or warning messages are suppressed.
BUFFER/K/N This option allows you to change the number of 512 byte buffers
used during the copying process. By default 200 buffers (100k)
are allocated, small files may be copied more efficiently with
fewer buffers than this.
CLONE/S If set, VersionCopy will copy the source date, comment and
protection bits to the destination.
DATE/S This instructs VersionCopy to set the destination date to the
same value as the source.
COM/S When this is set VersionCopy will copy the source file comment
to the destination.
NOPRO/S By default, VersionCopy retains the protection bits of the
source when it does a copy, you can suppress this action by
setting the NOPRO argument. (Note that this is ignored if CLONE
is set!)
IGNORENAME/S The version checking routine compares the version names given
in the source and destination files. If they are different then
VersionCopy assumes that you're trying to copy one version of
a file over a completely unrelated file and the copy fails.
Unfortunately this will lead to false error reports if the
author of the file or library changes the name in the version
string between versions - by setting IGNORENAME you can
deactivate the name checking.
RESULT
The following codes can be generated by VersionCopy in addition to those
generated by file commands in normal use (202 - object in use etc..):
0 (OK) VersionCopy did nothing - the destination is up to
date.
5 (WARN) VersionCopy copied the file
103 (NO_FREE_STORE) A memory operation failed and VersionCopy aborted
with no action
212 (OBJECT_WRONG_TYPE) Either the source is a directory or it doesn't
contain a version string.