The magazine of the Melbourne PC User Group
Using DOS Recover
Tom Coleman
|
 |
I am starting to develop a sneaking suspicion that those people at Microsoft are not as silly as I thought they were. I used to have deep sympathy for the family and friends of the people who devised DOS in general and in particular the person who thought up commands like NLSFUNC and RECOVER. I tell my students to avoid BACKUP and RECOVER along with VIRUSES, AIDS and oriental
gill-net fishermen.
Let me tell you about those gill-net fishermen, who are wall-of-death slaughtering our dolphins. They are tossing away their gill-nets that cost up to $200 per metre, just to annoy the greenies ($200 is more than a month's wages for most of these people). The skippers are paid a share of the profits. Clearly the normal economies of fishing do not apply to these madmen. In fact, I suspected that they graduated from their prodigal marine frivolities to writing DOS upgrades until - I don't know how to admit this - I found a use for the RECOVER
command!
I feel crushed and humiliated, like a teetotaller who finds that alcoholic drinks taste all right. (My psychiatrist suggested that I write this article as a means of coming to terms with the trauma.) RECOVER, I ask
you! I always thought that RECOVER was a TROJAN HORSE written by some demented Microsoft programmer (He was probably feeling bad about his anti-dolphin activities when he was younger.)
As you probably know, RECOVER is the DOS command that Microsoft includes so that you can gather up all the ides and subdirectories on your hard disk, change their names to FILEOOOl.REC or more and deposit them in the root directory, leaving no trace of the original file names or your directory structure. Perhaps just a farewell message "Directory FIX 512 files copied'.
I don't know about you but I accumulate floppy disks. I grab a blank disk and put something on it as a short-term measure, to sneakernet a
file or as a temporary holding place for the contents of a ramdisk or any of a dozen other reasons. However, once I have something on the disk, I tend to keep it until one day I run out of blank disks. Then I go mad and have a clean-out
At this point I can either reformat the disks or just delete the contents. Del *.* would work on most floppies, except that I just love subdirectories as a way of grouping related files together in separate areas.
I found that:
CD\ Bang
DIR *.
CD Pop
DEL *.*
CD \Bang\Whizz
DEL *.*
CD \Bang
DEL *.*
RD Pop
RD Whizz
CD\
DEL *.*
RD Bang |
could take almost as long as formatting the disk , so I shortened it to:
CD Bang
DIR *.
DEL Pop
DEL Whizz
DEL .
RD
CD\
DEL Bang
RD DEL .
|
which saved a few keystrokes but was still a bit tedious.
The problem with all this is that I could not easily automate the method in a batch file as the names, numbers of, and levels of subdirectories was unknown. The answer is to find something that indiscriminately zots files and subdirectories with wild abandon. Of
course! Of course! RECOVER, that villainous piece of software.
Eureka!
A quick batch file called ZOT.BAT:
ECHO Y | RECOVER A:
DEL A:\File*.*
|
and BINGO! Hooray for usl
I have RECOVER.COM in my C:\DOS subdirectory which is in the PATH, which allows ZOT.BAT to find RECOVER when it needs it As I use this batch file myself, I have not included any prompts about "Make sure the right disk is in Drive A:" nor have I added any GOTOs to recycle it for the next disk. (I just press F3.)
ZOT.BAT could be prettied up with CLSs here and there and the inclusion of a utility or two to BEEP or TUNE. A bit of redirection to NUL might reduce the screen clutter.
Even an @ at the start of some lines might help, provided you are using DOS 3.3 or later.
A Cure for All Ills
It has great potential for being fiddled with, this ZOT.BAT. It has occurred to me that if I can do this with RECOVER, I might be able to replace COMMAND.COM with the MARIJUANA VIRUS. The batch file would be called BUZZ. We could use it to train dolphins to stone oriental gill-net fishermen.
While I am doing my bit to make the world a better place for dolphins you can tweak ZOT.BAT to reflect the way that you would like it to be. Then go back to those two series of commands I gave earlier on and just make sure that you understand just what they do.
After that, and just to keep you honest - I could have achieved the same result without changing directories but it would have been horrible. How would you do it?
One last trap for young players. Run a copy of ZOT.BAT from drive A: just once. Then you will know better in future.
Go on, have a go. It is not that serious.
Work out what happens for yourself.
Reprinted from the August 1991 issue of PC Update, the magazine of Melbourne PC User Group, Australia
|