** 2 page regular beginners / 1716 words ** Disk Copying So you thought disk copying was straightforward? Mark Baines looks a little deeper... Programs can crash while writing to the disk for lots of reasons - maybe you pressed the wrong key, selected the wrong menu item, put the wrong disk in the drive, took the disk out of the drive with the motor was still running, spilt tea on it or maybe the baby found a new thing to chew! When a disk doesn't work any more or the program file is corrupted and you've had a good cry what can you do about it? Backups You can, of course, revert to your backup or master disk can't you? Yes? Well done! No? Hmmn, thought so, the importance of backing up every disk, whether commercial or PD can't be emphasised enough. Most, if not all, commercial software distributors allow this (indeed, any legal basis for preventing it is questionable) and one should always work from a copy of the master disk and not from the master disk itself. Of course, some disks cannot be copied so easily because of some 'protection' technique employed by the publisher to prevent copies being made for illegal distribution. It's usually only games which regularly fall into this category because most of us run applications from hard disks so the disk contents have to be either installed or copied anyway. There are two ways to copy a disk, the easiest being to use the Desktop's built-in Copy Disk function. Disk Copy This is achieved by dragging the disk icon A to disk icon B or using the appropriate item in the menu. Under TOS 1.04 Diskcopy is in the Format dialog, for instance. Space won't be wasted here describing how to do this except to say that the master or source disk should always be write protected by opening the little hole in the bottom left corner. If there is only one floppy drive and TOS asks for repeated changes of disk this will prevent the wrong disk being written to as it is easy to get muddled and have the wrong disk in the drive. Also, one shouldn't be too eager to take the disk out. Wait for the drive light to go out first. Taking a disk out when it is being accessed by the drive will damage the disk surface and possibly the drive's heads. However, many people do have problems with using this technique on some disks and understandably wonder why TOS is so awkward. GEMDOS demands that the format type of both disks be the same. They should both be single or doubled-sided and formatted to the same standard and size. GEMDOS has only ever allowed disks to be formatted from the Desktop with 80 tracks and nine sectors. When GEMDOS copies a disk it is reading each sector into memory and from here, copies them one at a time onto the destination disk. If that destination disk has 80 tracks and 10 sectors (a common format) then there are more sectors per track than GEMDOS has data for and the source disk boot sector's map of the disk structure doesn't match the destination disk's structure. The error alert "The destination disk is not the same type as the source disk. Please insert another disk" then appears. If it is known that the destination disk has an irregular format then the solution may be easy. Abort, format the disk from the Desktop and start again. But, many source disks are not formatted to the Desktop norm. Increasingly, distributors of software use greater capacity formats to get their large programs and data files onto them. Some use very unusual formats in an attempt to prevent them being copied. Unwittingly, it is easy to format a destination disk to the normal standard only to find they are rejected again. It would have been a simple matter for the TOS programmers to allow the destination disk to be formatted during the copying procedure using the details contained in the source disk's boot sector. Very little extra code would be needed and the result would be a tremendous improvement of versatility. But TOS isn't like that and so third party programs soon came to the rescue. A decent disk copier and formatter program is essential, the following have a good track record: ** bulleted list ** * FastCopy 3 by Martin Backschat (PD) * H-Copy by Robert Weiss (shareware) * FastCopy PRO (commercial £8.95 from FaST Club) * E-Copy (commercial from System Solutions) ** end list ** There are dozens of other PD disk copiers available but most aren't intelligent enough after closer inspection. FastCopy and H-Copy appear very similar and at first sight seem too complicated with lots of buttons and boxes which can put new users off. For the simple purpose of making disk copies it is no harder than using the GEM Desktop with the added bonus they're intelligent. Destination disks do not need to be formatted beforehand as FastCopy reads the source disk's boot sector and formats the destination disk to match it during copying. Selecting 'Fast Format Dest' and 'Read Disk Config' performs this. There is no need to alter the configuration in the 'Disk configuration' box and 'Get Sectors - all' should also be selected. Normally 'Verify Destination' should be selected as well. This causes the program to check that what it has just written to disk is the same as that temporarily stored in memory whilst copying. Very rarely does a disk or file copy fail, especially on hard disks but if making a backup of a valuable data don't take any chances! However, with Verify off, disk copying is almost twice as fast. If the format of the source disk is known and a destination disk is already formatted to match, then FastCopy is even faster and certainly worthwhile if backing up more than the occasional disk. File Copy The other way of copying disks is to copy each individual file across onto the destination disk. With GEM it is a simple matter of selecting all the files on the source disk and dragging them to the new one. There are several problems with this and some interesting benefits. One of the problems is that the GEM directory windows aren't very clever and selecting a whole disk of many files can take several operations, scrolling the window between each one. Many alternative Desktops allow all the items in a directory window to be selected as does the 'Select All Items' menu item in TOS v2 or later. Another problem occurs if the destination disk has a smaller capacity than the source disk, there might be some files incapable of being copied across because of lack of space. Of course you could check the disk capacities beforehand but who thinks to do that? Anyway, doing a 'Show Info' on a disk gives very misleading results. Quite often the 'Bytes Used' figure is obtained by adding up the length of each file on the disk and bears no resemblance to the amount of disk space they occupy on your destination disk. Different programs and desktops also give different figures. Most programs give consistent values for the 'Bytes Free' but this is only the maximum number of bytes that can be stored if every sector on every track is full to the brim. This is never the case and can be very misleading - especially when copying lots of small data files. Space which is theoretically available disappears once files have started to be copied over. One of the major benefits of copying individual files is they can be copied in any desired order. Why? If working from floppy disks a quicker boot up or execution of an application can be achieved by copying the program file, its resource and configuration files onto an empty disk in that order so they are placed on the first tracks of the disk, just after the directory sectors. If this is also a boot up disk, copy the AUTO folder programs first, then the accessories and lastly, the application program files. These files are in the correct order for being loaded and will occupy contiguous sectors and tracks which greatly decreases the amount of time the drive's heads are moving over the disk surface. This also applies to hard disks, especially larger capacity ones, where there can be a significant improvement in the load up time of a large application. After this has been done, the data files and other stuff which is only accessed infrequently can be copied. When a disk gets used a lot, files get deleted leaving empty sectors scattered about the disk. New files occupy the first empty sectors designated as being free in the File Allocation Table (FAT). This typically results in large files being split into non-contiguous sectors all over the disk. This is apparent when the disk drive motor is heard moving backwards and forwards across the disk surface when loading a single file. Such files are said to be fragmented. Because the heads have to travel further, fragmented files take significantly longer to load. To defragment all the files on the disk (making them contiguous again) and optimise their load times copy them all to another disk (RAM disks are ideal for this). Delete all the files or reformat the original disk and copy them back again, remembering to copy any program files first. If the files aren't deleted before copying them back, they are copied into the same sectors again which makes no difference at all! The fastest and most versatile file copier around is Kobold (commercial from Systems Solutions) which makes these tasks - as well as copying hard disk partitions around - effortless. ** MSB5_1.GIF ** FastCopy fulfils most disk copying needs and includes an extensive formatter where favoured formatting configurations can be saved as Presets ** MSB5_2.GIF ** Select the files on one side, select the destination path and click - easy and very fast! Kobold can also be taught to play back an operation again at a later date - ideal for speeding up repetitive copying tasks ** MSB5_3.GIF ** Look at all that fragmentation! Files split all over the disk take longer to load up. Diamond Edge can defragment these but using Kobold to move the files to another disk and back again is lightning fast