You are on page 1of 6

LOADDSKF & SAVEDSKF User's Guide

(c) Copyright International Business Machines Corporation 1993.


All rights Reserved.
01/27/93

LOADDSKF & SAVEDSKF


___________________

INTRODUCTION
____________

SaveDskF.exe and LoadDskF.exe are a pair of utilities to


save a diskette to a file and vice-versa. These programs are
not intended to save fixed disk images. They have these
characteristics:

� Run under OS/2 and DOS 3.3 or later.

� Empty sectors above the highest occupied sector are not


included in the file.

� The data may be compressed.

� Diskettes may be formatted as they are written.

� Standard diskette formats are supported.

� Conversion to a larger diskette image is possible.

� Label text may be included in the file that is displayed


by LoadDskF before the diskette is written.

� The progress of the data transfer is visible on the


screen.

� Built-in Checksum function.

� Handles "image" files generated by other programs.

Efficient portability of complete diskette images is pro-


vided for transmission via data networks. Boot, file allo-
cation table, directory and data sectors are included. Both
programs provide a short help facility when some types of
syntax errors are detected. Just type the program name to
get help.

LOADDSKF & SAVEDSKF 1


LOADDSKF
________

The calling syntax is:

LoadDskF [D:][path]filename.dsk d:[/F][/C][/Y][/Q]

The diskette image contained in the file is written to the


specified target drive d:. The target diskette must have
the same format as the original diskette. If the format is
incorrect, an informational message indicates the required
format.

A warning message appears before the data transfer begins so


that syntax errors do not result in a corrupted diskette.
It is necessary to press the "y" key in order to continue
the process. A return code of 31 (decimal) is issued if the
response is not "y". Alternatively, /Y will bypass the need
to press the "Y" key. When both /Y and /Q are invoked, the
warning message is omitted.

In the event of a checksum error, both the expected and cal-


culated values are displayed.

IMAGE FILES
___________

Loaddskf supports input files that represent a pure binary


image of the disk that has been generated by SaveDskf with
the /D and /A options or other programs, such as DSKIMAGE
and DISKIMGE. Image is defined as the uncompressed disk
data without header or trailer. The file must be the exact
size of a standard diskette. Diskettes supported are 1.44M,
1.2M, 720K and 360K.

FORMATTING
__________

When /F is specified, each track is formatted before it is


written. When all of the data has been written, LoadDskF
continues to format the remainder of the tracks.

LOADDSKF & SAVEDSKF 2


CONVERTING A DISKETTE
_____________________

When /C is specified, the diskette image can be written on a


diskette of a different format than the original diskette
provided that it is at least as large as the original. The
resultant diskette's capacity will then appear to have the
original diskette's capacity. After executing LoadDskF /C,
it is recommended that the files be transferred to another
diskette using the DOS copy command. The diskette with the
truncated capacity can then be reformatted.

When you use the /C option together with the /F option, your
diskette will be formatted to the highest density supported
on the drive (not exactly true, but it will be most of the
time). There is no means for specifying lower capacity me-
dia. The image written to diskette will be logically the
same as the source. There are some subtle differences, how-
ever. Let's assume that we have a 1.2Mb image that we want
to put onto a 1.44Mb diskette. There are 18 sectors per
track on a 1.44Mb diskette. There are only 15 on a 1.2Mb
diskette. In this case we would only write 15 of the 18. The
boot record would tell us that there were only 15 sectors
per track. This looks to DOS just as if it were a real 1.2Mb
diskette. Physically, there are actually 3 sectors on each
track that are not used. DOS is told they don't exist and it
never looks for them.

When you tell LoadDskF the /F option, it will format the


output diskette to the same density as the input diskette
image (providing, of course, that the diskette drive sup-
ports that kind of image).

If you ALSO use the /C option, your diskette will be format-


ted to the highest density that the drive supports. If we
assume we have a 2.88Mb diskette drive and a 1.2Mb or 1.44Mb
diskette image, the diskette will be formatted to 2.88Mb.
The image written to diskette will be either 1.44Mb or
1.2Mb. It will PHYSICALLY be formatted as 2.88Mb, but will
LOGICALLY be a 1.44Mb or 1.2Mb diskette. If you first wrote
the 1.44Mb image to a diskette and then used ONLY the /C op-
tion and wrote a 1.2Mb image to the same diskette, it would
work. If you now try to write a 1.44Mb image to the same
diskette with only the /C option, it would fail. This is be-
cause DOS thinks that you have a 1.2Mb diskette in the drive
and a 1.44Mb diskette won't fit. In this case, you MUST use
both the /C option and the /F option.

It is important to understand that this is not an all encom-


passing conversion from 3.5 to 5.25 inch media. In some in-
stances, 3.5 inch media is provided for PS/2 systems and
5.25 inch media for PC systems. Therefore code that supports
hardware may be different for each media type.

LOADDSKF & SAVEDSKF 3


In those cases where the media type is unimportant, a file
packager such as SaveRam or PKZIP is strongly recommended
over SaveDskF so that those who receive the packed file need
not have a particular type of diskette drive.

PROGRESS INDICATION
___________________

As the data is written to the diskette, the percentage of


the data which has been written is displayed on the screen.
If the diskette is being formatted as it is written, the
percentage is based on the diskette capacity.

DOS COMPATIBILITY MODE


______________________

There is sometimes a problem when operating in the DOS com-


patibility mode where DOS does not recognize the newly gen-
erated diskette. When this happens, the diskette appears to
have incorrect system information and it is necessary to
partially remove it and re-insert it in the drive.

UP/DOWN LOADING
_______________

When transferring diskette image files between the PC and a


host system, it is necessary to treat them as binary files,
i.e. no translation of data must occur. If the file data
has been translated, LoadDskF will usually give an error
message indicating that the file is not compatible with
LoadDskF.

It is also necessary to download any executable file includ-


ing LoadDskF.exe and SaveDskF.exe as binary files without
translation. When translation occurs, the results are un-
predictable and usually hang the machine requiring a power
off/on sequence to get back into operation.

LoadDskF will ignore any data at the end of a file that is


shorter than a complete sector. This provides some
forgiveness for the common error of uploading to a fixed re-
cord length file on a host system which results in a mean-
ingless string of data at the end of the file which is
usually not longer than 80 bytes.

LOADDSKF & SAVEDSKF 4


SAVEDSKF
________

The calling syntax is:

SaveDskF d: [D:][path]filename.dsk [/D][/A][/N][/M][/K]

Since the diskette that the file will be copied to by


LoadDskF must be the identical format as the original, it
may be helpful to give the file a name that is indicative of
the required format, or include the diskette type in the
commentary message (/K or /M flag). An extension of .DSK is
recommended to indicate a diskette image file.

The complete image of the diskette in drive d: is written to


the specified file. A file header as described below and
all diskette sectors are written up to and including the
highest occupied data sector. Whether or not a data sector
is in use is determined from the file allocation table. An
informational message is displayed if some of the sectors
written do not actually contain data. This means that there
are some gaps in the data portion of the diskette. An ap-
propriate response is to run a disk defragmentation program
against the source diskette. Copy protected diskettes having
non-standard sector numbers cannot be saved by SaveDskF.
Only standard DOS formats are supported.

As the data is written to the file, the percentage of the


data which has been written is displayed on the screen.

PURE DISKETTE IMAGE


___________________

The /D option omits the file header and inhibits compression


of the diskette data. The resulting file is intended for
use with diskette copying software and is not compatible
with LoadDskF.exe unless the /A option is also used. When
/D is specified, /K and /M will generate an error message.

SAVE ENTIRE DISK


________________

The /A option saves the whole diskette regardless of the


data stored on it.

LOADDSKF & SAVEDSKF 5


DATA COMPRESSION
________________

The /N option inhibits data compression. This is useful


when the compression algorithm fails and produces data that
is larger than the uncompressed data. When this happens,
SaveDskF displays an informational message recommending that
you rerun the program with /N specified.

COMMENTARY MESSAGE
__________________

The /M option tells SaveDskF to get text from the specified


file to be included as a comment in the diskette image file
which LoadDskF will display before unloading the diskette
data. It may contain information on any aspect of the
diskette usage or the way it is to be unloaded. This pro-
vides a means of ensuring that the recipient of the diskette
will be aware of important information.

The /K option allows you to type in a brief commentary mes-


sage on the command line. The text must follow immediately
and be enclosed in either single or double quotes. The en-
tire command length is limited to 128 bytes. When enclosed
in single quotes, double quotes may be used in the text and
vice versa. If a message file has been specified with /M,
the /K text is added to its contents. The total length of
the message may be up to 4096 bytes.

Examples of these flags are:

SaveDskF a: test.dsk /k"This is a 1.44Mb diskette"


OR
SaveDskF a: test.dsk /m test.msg
OR
SaveDskF a: test.dsk /mtest.msg

Where test.msg might contain:


+--------------------------+
+ This file could contain +
+ the text that you would +
+ want printed on the label+
+ of the diskette. +
+--------------------------+

LOADDSKF & SAVEDSKF 6

You might also like