home *** CD-ROM | disk | FTP | other *** search
- /*
- * MAKEDSK.CMD
- *
- * Basic REXX exec to build a number of disks from disk images.
- * The program calls LOADDSKF.EXE to do the actual load, and does some
- * rudamentary error checking.
- *
- * Input on the command line determines the drive to build the disks on,
- * the filenames of the files to feed to LOADDSKF, and the title of the disk
- * to display to the user. The number of disks is inferred from the number
- * of parameters. No error checking is done on the input. Example input
- * line follows.
- *
- * MAKEDSK A: DISKIMG1.DSK /First disk/ DISKIMG2.DSK /Second disk/
- * -- ------------ ---------- ------------ -----------
- * | | | | |
- *Output Drive+ | | | |
- * First disk image + | | |
- * Title of first disk + | |
- * Second disk image + |
- * Title of second disk +
- *
- * The title is delimited by forward slash characters (/). These will not
- * be displayed to the user.
- * There is also a check for disk size. In this release it is assumed to
- * be 1.44 Mb.
- */
-
- Trace 'o'
- Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
- Call SysLoadFuncs
-
- /* Parse the command line */
- Parse arg drive dskimg '/' title '/' remainder
-
- size = 1457664
- nbr = 1
- CLS
- Do While dskimg \= ''
- Say 'Put a blank diskette for disk' nbr || ', "' || title || '",'
- Say 'into drive' drive || '.'
- '@Pause'
-
- /* Make sure the disk is in the drive and that it is the right size */
- dskinfo = SysDriveInfo(drive)
- Parse Var dskinfo drv fre sze .
- If drv = '' Then
- Do
- Say ''
- Say 'ERROR: No diskette is present in drive' drive || '.'
- Say ''
- '@Pause'
- Iterate
- End
- If sze \= size Then
- Do
- Say ''
- Say 'ERROR: The diskette in drive' drive ' is not the correct density.'
- Say ' Please replace with an appropriate diskette.'
- '@Pause' /* Added by Rune 6.5.94 */
- Say ''
- Iterate
- End
-
- /* Store the disk image */
- 'LOADDSKF' dskimg drive
- If rc \= 0 Then
- Do
- Say ''
- Say 'ERROR: Disk image did not load properly. Diskette install terminating.'
- '@Pause' /* Added by Rune 6.5.94 */
- Say ''
- exit 1
- End
- Say ''
-
- /* Parse the next parameter */
- Parse Var remainder dskimg '/' title '/' remainder
- nbr = nbr + 1
- CLS
- End /* Do While remainder \= '' */
-
- Say 'All diskettes have been made.'
- '@Pause'