Dec 092017
 
Utility that copies (and verifies) files to DSDD disks which were formatted on High Density AT drives.
File SAFECOPY.ZIP from The Programmer’s Corner in
Category Utilities for DOS and Windows Machines
Utility that copies (and verifies) files to DSDD disks which were formatted on High Density AT drives.
File Name File Size Zip Size Zip Type
SAFECOPY.COM 55653 27124 deflated
SAFECOPY.DOC 8836 3588 deflated

Download File SAFECOPY.ZIP Here

Contents of the SAFECOPY.DOC file


-------------------------------------------------------------------------
SAFECOPY USER NOTES AND REFERENCE MATERIAL
-------------------------------------------------------------------------
FUNCTIONAL SUMMARY
------------------

SAFECOPY was made to offset the reliability problems that sometimes
show up when DSDD diskettes are formatted on high density drives.

SAFECOPY performs the following functions:

- copies one or more files to drive A: or drive B:

- accepts a standard directory search string as
selection criteria

- uses a "best fit" algorithm to maximize diskette
utilization

- verifies the copy results by explicitly re-reading
the copied file from zero (0) to nine (9) times

- marks unsafe areas on the target drive as they are
encountered

- offers in-process CHKDSK, FORMAT, and shell options

- SAFECOPY uses NATIVE format. That is to say that
a com file gets copied as a com file. You don't
need a commercial product to restore your backups.


COMMAND LINE SUMMARY
---------------------
(type SAFECOPY for a reference card)

SAFECOPY {file specification} {target drive} [options]

where:

file specification is a legitimate DOS search specification
indicating the file(s) you want to copy.

target drive is either A:, B:, /TA:, or /TB: indicating where
the file(s) should be copied to.

options are discussed below:

/E (extended search) Use this option to search in subdirectories
beneath the current directory.

/Vn (verify passes) Use this option to specify the number of
verification cycles SAFECOPY should use. Valid values
are /V0, /V1, /V2, /V3, /V4, /V5, /V6, /V7, /V8, and /V9.
If you are confident with your diskettes and just with
to employ SAFECOPY's best-fit algorithm, use /V0.

/Bx (buffer size) Use this option to specify the SAFECOPY
buffer size. Valid values are:

/BS Small buffer size
/BM Medium buffer size
/BL Large buffer size

NOTE: selection of a buffer size controls the size
of areas on the target diskette that are marked bad.

HOW DOES SAFECOPY WORK????
--------------------------

In the initialization phase, SAFECOPY creates a list of files that
match your search specification (*.*, *.com, etc).

SAFECOPY then checks the available space on the target and uses its
best fit algorithm to select a file to copy. The file is copied and
verified according to the directives you provided.

If either the copy or verify phase fail, SAFECOPY enters a restoration
cycle which goes as follows:

- a CHKDSK /F is executed to resolve the FAT/DIR TABLE
discrepancy (because the FAT is updated before the
write takes place)

- a BADXXXX file is created over the fail spot

- any partial copies are deleted

- SAFECOPY returns to the best fit algorithm, note that
this frequently results in selecting the same file.
Don't be alarmed if this happens - the creation of the
BADXXXX file assures that a different area of the target
will be used.

THE SOURCE DRIVE
----------------

SAFECOPY does not alter the source drive in any way. Attributes are
not changed. At the end of processing, SAFECOPY will offer to create
an activity file called SAFECOPY.LOG which will contain a summary of
SAFECOPY's processing activities.

MARKING UNSAFE AREAS
--------------------

When a SAFECOPY copy or verification cycle fails, the area on the
target diskette is flagged by creating a BADXXXX file over the
unsafe spot. BADXXXX is used here to represent BAD00001, BAD00002,
BAD00003, and so on. Unlike the commercial utilities, the FAT on
the target diskette is not disturbed, and you are free to erase
the BADXXXX files and attempt to use those areas later. The size
of each BADXXXX file is a function of the buffer size.

THE BUFFER SIZE
---------------

SAFECOPY's buffer size is set by a command line option to one of
three values:

SMALL This means that SAFECOPY will work in units
of one (1) cluster. This option is for purists
who demand maximum diskette performance. The
trade-off when using a SMALL buffer size is
that SAFECOPY will take longer to run.
Specify SMALL by including /BS on the
command line.

MEDIUM This means that SAFECOPY will work in units
of fifteen (15) clusters. Specify MEDIUM
by including /BM on the command line.

LARGE This means that SAFECOPY will work in units
of thirty (30) clusters. Using this option
will provide significant improvements in
run time, but bear in mind that each BADXXXX
file will be thirty (30) clusters long.
This is the recommended size for DSDD or HD
diskettes. Specify LARGE by including
/BL on the command line.


CAVEATS, WARNINGS, and RESTRICTIONS
-----------------------------------

SAFECOPY works on CGA/EGA/VGA in 80 x 25 mode only. SAFECOPY requires
DOS 3 or +. SAFECOPY does not alter the archive attribute bit. SAFECOPY
is a tool for sysops, power users, and others who must make single-pass
diskette copies reliably. If this does not describe you, or you cannot
get SAFECOPY to work for you, please use one of the alternatives listed
below. As with any copy operation, SAFECOPY's results become unpredictable
when dealing with cross-linked and orphan clusters. Before starting,
run CHKDSK on both your source and target drives to assure the integrity
of your files.

SAFECOPY ALTERNATIVES
---------------------

The easiest alternative is to copy your files to (say) A: then
perform a COPY A:*.* NUL command. This action will invoke the
critical error handler on files that landed on unsafe areas. Rename
those files to something else (like BAD0001, etc) and start over again.

The next alternative involves one of the commercial diskette testers.
DT.EXE in the Norton Utilities springs to mind, but is terribly noisy
as it beeps on every bad cluster. MACE DIAGNOSE in Mace Utilities and
COMPRESS by Central Point are fun to watch, but throwing that real-time
disk map on the screen takes extra time. My choice is VMARKBAD in the
Golden Bow Utilities, it wins on speed, simplicity, and
stdout/BIOS output. The table below summarizes my findings.

UPSIDE DOWNSIDE
-----------------------------------
DT Flexibility Noisy
Batch mode Bundled in package

MACE Muliple passes Writes over its
Good visuals messages too fast
Batch mode

COMPRESS Best visuals No batch mode
Fastest operation(?)

VMARKBAD Fast
Stdout messages
Batch mode
Quiet


RAMBLINGS AND DRIVEL FROM THE PROGRAM AUTHOR
--------------------------------------------

With SAFECOPY, I have reached an acceptable solution to a problem
I've had for several years now (which has led to OPT.COM OPT2.COM,
SOPT.COM, and OPTCOPY.COM) of combining optimality with verification,
and plan to let the quest die here. The program itself is written
in Turbo C 1.5 and tested under Microsoft C 5.01 (beta), on an AT.
At first, I wanted to use C-SCAPE LOOK AND FEEL for the presentation,
but eventually settled on INSTANT REPLAY and QLIB becuase of the
size and convenience. With the exception of the presentation
routines, ALL of the work is done through standard DOS service
calls. Of the DOS service calls ALL are documented with the
exception of 32h, which I use to find the maximum number of
root entries on the target drive.

SAFECOPY worked quite well for me for several months before finally
deciding to upload it. To satisfy go ibmsw, I inserted the CGA/
EGA/VGA and DOS version requirements. As per my usual behavior,
I have no interest in collecting fees or royalties or registrations
or any other type of monetary recognition. You can use, copy, sell,
emulate, distribute, decompile, and otherwise gain from this program as
you see fit. On the other hand, I accept no responsibility for any
adverse results you may experience. Remember that it is professional
courtesy to upload UNMODIFIED versions.
-- Garry J. Vass
[72307,3311]


 December 9, 2017  Add comments

Leave a Reply