home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Bila Vrana
/
BILA_VRANA.iso
/
005A
/
DIRCO603.ZIP
/
DIRCOMP.DOC
< prev
next >
Wrap
Text File
|
1996-03-21
|
13KB
|
261 lines
DIRCOMP.DOC 1 Revised: 03/21/96
DIRCOMP compares two complete subdirectories and looks for dissimilarities
between files (different sizes or creation dates as well as missing files). It
produces a disk report called (by default) C:\DIRCOMP.TXT showing the
dissimilarities. In some ways, this is similar to a separate utility called
FILUPDAT but DIRCOMP adds a couple of features:
* It can resolve the dissimilarities for you. When you call the
routine, you provide a primary subdirectory and a secondary subdirectory.
If files in the primary subdirectory are more recent than those in the
secondary subdirectory, DIRCOMP can copy the files for you (similar to the
DOS REPLACE command with the /U option).
* In addition, if files exist in the secondary subdirectory that aren't in
the primary, DIRCOMP can kill the files in the secondary subdirectory for
you.
* Can produce a status file showing what was compared, resolved, etc.
* DIRCOMP can also go through child subdirectories for you and do this
effort throughout.
* DIRCOMP can move the files instead of copy them, effectively allowing you
to prune and graft directory structures.
To reduce the risks inherent in this sort of automatic execution, neither
/UPDATE or /KILL are available if the secondary subdirectory is a network drive
unless the "/NET" option is passed in.
DIRCOMP is typically used in the process of backing up files from one drive to
another. DIRCOMP allows you to easily copy every file and get rid of now
non-existant files.
Most people who report using DIRCOMP say they use the program to maintain
workstations in a networked environment. They take the files from a network
directory and use them to replace the files on the workstation.
Note that DOS includes a command called REPLACE which will do some of the same
things that this utility does. The central differences are that REPLACE won't
delete mismatched files and it doesn't produce a report on inconsistencies.
REPLACE also doesn't have the ability to handle odd attributes or deal with
cascading subdirectories. REPLACE *is* a lot quicker though.
Notes:
(1) I myself have no use whatsoever for this command because I don't do any
network maintenance stuff anymore. It's also a freebie program. As such,
I'm not all that inclined to make a lot of revisions to the routine. As
with all of my programs, feel free to make suggestions but, especially with
this command, please don't take it personally if I don't act upon them.
(2) One user has complained that this utility causes QEMM to shut down after it
is run. Any other experience with this?
(3) One user reported that he was trying to write to a Novell network drive and
nothing was being copied. It's possible that Novell sets attributes in
unexpected ways. Using /ATTR=HSR got around this problem.
(4) Win95 notice: As with most DOS-based utilities, this program doesn't
understand the long file names that were introduced with Windows 95. It
also cannot handle long pathnames from Windows 95.
DIRCOMP.DOC 2 Revised: 03/21/96
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.DOC file),
- Through the use of an environmental variable (SET DIRCOMP=whatever), or
- From the command line (see "Syntax" below)
Syntax:
DIRCOMP directory1 directory2 [ /S ] [ /CREATE ] [ /Xfilespec ]...
[ /UPDATE ] [ /KILL ] [ /CLONE ] [ /MOVE ] [ /ATTR=[H][S][R] ] [ /NET ]
[ /F[rptfile] | /-F ] [ /OVERWRITE | /APPEND | /-OVERWRITE | /OVERASK ]
[ /ALL ] [ /Tdrive: | /Tdrive:\path ] [ /COLOR=nnn | /-COLOR ]
[ /Q ] [ /Iinitfile | /-I ] [ /? ]
where:
"directory1" is the name of the primary (source) subdirectory. If /UPDATE is
used, the secondary subdirectory's contents will be changed to reflect the ones
here.
"directory2" is the name of the secondary subdirectory which will have files
copied to it or deleted from it.
"/S" goes through and processes subdirectories off of the subdirectories you
specified in a cascading manner. You can use this option to copy entire
directory trees if you want. Still requires /UPDATE if you want it to actually
do anything besides report on conditions of course. The program may not be
smart enough to delete all embedded subdirectories. "/-S" (the opposite) is
initially the default.
"/CREATE" will create directory2 if it doesn't exist already. "/-CREATE" (the
opposite) is initially the default.
"/Xfilespec" says to exclude certain filespecs from being considered.. You can
specify up to 10 exclusion parameters but each must have their own /Xfilespec
statement. For example, to exclude all files with a CFG extension, you could
say "DIRCOMP (other parms) /X*.CFG".
"/UPDATE" says to copy any files from directory1 to directory2 which are either
(a) newer in directory1 or (b) not in directory2 at all. Files will *NOT* be
copied if (a) the directory2 files are more recent or (b) file sizes are the
only difference. See also /KILL, /CLONE, and /MOVE. "/-UPDATE" (the opposite)
is initially the default.
"/KILL" says to delete any files in directory2 which are not in directory1.
/KILL automatically invokes /UPDATE. "/-KILL" (the opposite) is initially the
default.
"/CLONE" says to copy all files from directory1 to directory2 even if the files
in directory2 are more recent than those in directory1. /CLONE automatically
invokes /UPDATE. "/-CLONE" (the opposite) is initially the default.
DIRCOMP.DOC 3 Revised: 03/21/96
"/MOVE" says to move the files instead of copying them. This deletes from
directory1 any file that was copied to directory2. (The deletion is done only
if the initial copy succeeded.) Typically, the option is used in combination
with the /CLONE option. Since this option is kind of scarey if used
incorrectly, you have to specify /UPDATE as well in order to use it. "/-MOVE"
(the opposite) is initially the default.
"/ATTR=[H][S][R]" allows you to specify a combination of attributes that you
want considered. Normally, hidden, system, and read-only files are ignored by
the routine. Using /ATTR, you can include whatever you want. /ATTR=HSR, for
example, gets them all.
"/NET" removes a restriction which does not allow the secondary directory to be
a network drive. Note that the test the program performs for this is somewhat
imperfect and it may not notice that it's actually a networked drive. Sorry!
"/-NET" (the opposite) is initially the default.
"/Frptfile" (or "/Rrptfile") provides the name of the report file to create. If
"/F" by itself is specified, it's the same thing as saying "/FC:\DIRCOMP.TXT".
Specifying "/FSCRN:" will send the report to the screen. The default is
initially to create no report at all ("/-F").
"/-F" (or "/SKIP" or "/-R") stops the creation of the report file. This is
initially the default.
"/OVERWRITE" says to overwrite the report file if it's already there.
"/APPEND" says to append to the end of any existing report file.
"/-OVERWRITE" says to abort if the output file exists already.
"/OVERASK" says to prompt if the output file exists already. This is the
default.
"/ALL" says to write all files to the report file (typically C:\DIRCOMP.TXT),
not just the ones that have differences. "/-ALL" (the opposite) is initially
the default.
"/Tdrive:" specifies the drive to write any temporary ISAM files that the
routine needs. ISAM data bases are used to store and sort the file names. ISAM
files cannot be created reliably on certain types of drives. If a