The magazine of the Melbourne PC User Group

Diskette Copying
Tom Coleman

Being a computing instructor frequently involves me in having to make anything from 6 to 15 copies of a disk for my students.

I have a couple of utilities that will copy a file up into memory and make multiple copies on request but if I want a whole disk they can't cope. There are a couple of utilities around that are suppose to do it by the full disk. I can never find utilities when I need them.

Sometimes I want to copy files from a number of different disks so I need to make a master first.

This is how I have got around it. I create a 400 kB RAM disk. I then copy the disk or files into it Then I make my copies from that. It halves the copy time and repays the effort if more than three or four disks are involved. 

However to create a ramdisk usually means modifying the CONFIG.SYS Me. I suppose I could modify
DEVICE=VDISK 60

(I normally have a 60 kB RAM disk) to read

DEVICE=VDISK 400

each time I want a big ram disk but I chose to write a batch file to do it for me.

For the purposes of this exercise I have assumed a CONFIG.SYS with only three lines:

BUFFERS=20
FILES=20
DEVICE=VDISK 60

The only line I am concerned with is DEVICE=VDISK 60. The others are to make it look like a CONFIG.SYS file.

First of all I created a second file the same as the original CONFIG.SYS with the exception of the DEVICE= line. Thus:-

BUFFERS=20 
FILES=20 
DEVICE=VDISK 400

This file I named CON400.TMP. I could have called it anything but that name appealed to me.

I then issued the command

COPY CONFIG.SYS CON60.TMP

This has the effect of making a duplicate copy of the CONFIG.SYS file naming the copy con60.tmp

I then wrote (using EDLIN, I could have used PCWRITE but I am a masochist) a couple of batch files to swap the names of the files and reboot the system.

The first I called RAM400.BAT. It looks like this:-

COPY CON400.TMP CONFIG.SYS 
WARMBOOT

This uses the copy command to create a duplicate of CON400.TMP called CONFIG.SYS. The new copy overwrites the old copy.

WARMBOOT is a utility available through bulletin boards and Melb PC PD library. It is a software version of Ctrl/Alt/Del. It causes the system to reboot.

Upon rebooting the new CONFIG.SYS is loaded and we have a 400k ramdisk.

To get out of this RAM hogging situation I wrote the second batch file, RAM60.BAT which reverses the situation:-

COPY CON60.TMP CONFIG.SYS 
WARMBOOT

This does exactly the same as the other batch file. It creates a new CONFIG.SYS and then reboots.

All of this seemed to be satisfactory until I found the PATH command only works on COM, EXE and BAT files. In other words my *.TMP files needed to be in the current directory or it would not run.

The simple way out was to modify both batch files by including as the first lines in both:

C: 
CD\

This had the effect of changing drives in case I was not in drive C: and then changing to the root directory in case I had changed to a sub-directory when I changed drives.

keep all my .BAT flies in a sub-directory called BELFRY which is in the PATH command in my AUTOEXEC.BAT so I have no problem using the batch files.

Similarly WARMBOOT.COM is in my UTILS sub-directory which is also in the PATH.

I don't like to have any more files in my root directory than is required to boot up. I moved the .TMP files to a sub-directory called STARTUP where I keep spare copies of my AUTOEXEC.BAT and other files I would like to keep on hand just in case I foolishly zap them

That meant putting a full file spec into the batch. RAM400.BAT now reads:

C: CD\ COPY C:\STARTUP\CON400.TMP C:\CONFIG.SYS 
WARMBOOT

and RAM60.BAT reads:

C: 
CD\ 
COPY C:\STARTUP\CON60.TMP C:\CONFIG.SYS 
WARMBOOT

This idea of using rebooting batch files to change the environment can be extended to rewrite the AUTOEXEC.BAT to load a different set of TSRs, modify the PATH command, load up a bunch of files from drive A: and sit in the background until processing was done and then prompt for a backup procedure, or whatever your devious mind can dream up.

I keep telling my students that the way that you choose to compute is a reflection of your personality, the way you think. It's no good me telling you how to go about it.

I will bet you would never have set up your ram disks this way. I will even bet you know a better way.

Hooray for you.

I will bet you will have difficulty finding some one to agree with you as to the best way.

These .BAT files copy the new version of CONFIG.SYS and then reboot the system.

RAM60.BAT

C: 
CD\ COPY 
C:\STARTUP\CON60.TMP C:\CONFIG.SYS 
WARMB00T

RAM400.BAT

C: 
CD\ 
COPY C:\STARTUP\CON400.TMP C:\CONFIG.SYS 
WARMBOOT

CONFIG.SYS is always a copy of one of these files:

CON60.TMP

BUFFERS=20 
FILES=20 
DEVICE=VDISK 60

CON400.TMP

BUFFERS=20 
FILES=20 
DEVICE=VDISK 400

Reprinted from the December 1991 issue of PC Update, the magazine of Melbourne PC User Group, Australia

[About Melbourne PC User Group]