OOPS

Copyright Dr Alan Solomon, 1986-1995

This is a sad story, with a happy ending, and a moral. Take heed.

This is the tale of Timothy T., who could be rated as a fairly expert user; 
knows his way around DOS and is very nifty with 123. Like most people, he 
does backups only very rarely, because computers never go wrong, do they? 
Yes, Timothy, computers do go wrong sometimes, and then you can lose 
everything on your hard disk. But in this particular case, it wasn't a 
hardware problem, but what we in the trade call "finger trouble". 

Timothy was doing some housecleaning on his hard disk; getting rid of old 
files containing things that no man knew what, getting rid of unnecessary 
backup copies, and so on. At one point, he used the command DEL *01.WKS to 
get rid of a whole series of unwanted 123 worksheets, but then he found that 
he couldn't delete other .WKS files. He did a DIR, and to his horror, he 
found that ALL of his .WKS files had gone! At this point, he made a very 
smart move. He hung a notice on his XT saying "DO NOT USE", and went to get 
expert assistance (it's surprising how many people dont ask for help from an 
expert just because they cant see any way the expert might be able to help; 
it's knowing how to do things that they don't that makes him an expert). 

When I arrived, I made the usual sharp intake of breath, and the usual song 
and dance about how difficult it all was, and how he'd be lucky if we could 
restore anything at all (if you don't make a lot of loud grunting noises, 
people assume that the weight isn't heavy). Then I asked him where his 
backup disks were, and made myself look all surprised when he said there 
weren't any, but he agreed with me when I said there would be from now on, 
wouldn't there? Yes. I told him not to let anyone touch the machine until 
I'd had a go at it, and went to fetch my toolkit. 

When DOS (or any program running under DOS) deletes a file, the data isn't 
actually scrubbed. The space the file takes up is marked as free to be used, 
and the directory entry is flagged with a special mark that means "file 
deleted". So it is possible to "un-delete" a file, and there are packages on 
the market that make this fairly easy. The best-known of these, and one of 
the easiest to use, is called "The Norton Utilities", after Peter Norton, 
their author (get the latest version 3.0, from P & P micro ). These 
utilities contain all sorts of useful things to do with DOS, but one of the 
lifesavers is the utility that unerases files. 

I fired up the XT, and invoked Norton. Timothy sat by me, nervously, while I 
drove the XT. First I showed him all the deleted filenames; about 150 of 
them, like a elephants graveyard. Some of them he recognised, others must 
have belonged to the previous owner. We made a list of the files that he 
needed to have back, and I set to work. I made lots of loud grunting noises, 
but actually it was a piece of cake. I was able to restore most of the 
deleted files, but a few were gone forever. 

I explained to Timothy what had gone wrong; when DOS sees the * wildcard, it 
assumes that it applies to the rest of the filename. So *01.WKS doesn't mean 
what it feels that it should mean; it means *.WKS. Then I showed Timothy a 
neat little trick; before I do any deletions involving tricky wildcards like 
* and ?, I check the effect by doing a DIR with the same wildcards; that 
tells me exactly what files the DEL will affect. Another nice idea is to use 
a utility called VDEL (available from the user groups Library) which has the 
same syntax and effect as DEL, but shows you the filename and asks you to 
verify Y or N before deleting each file. 

Timothy is now a sadder (but not as sad as he might have been) and wiser 
(he's doing backups now) man, and we both hope that others can learn from 
his experience. 

Alan Solomon