Trash Talk: Understanding the Recycle Bin

In the early days of the PC revolution, accidentally deleted files were gone for good, and no amount of cursing, groaning, or bellyaching would get them back.

Then some genius realized that when DOS deleted a file, it didn't actually delete the file's contents. Instead, it just changed the file's name so that the first letter began with a lowercase Greek sigma, and it changed all the file's FAT entries to 0 (to indicate that these clusters could be used by another file). Thus was born the "undelete" command, which could restore a deleted file by restoring the FAT entries and the original first character of the filename.

The problem, however, was that if you didn't undelete the file quickly, some other file would come along and use up some of the deleted file's clusters, and the file would be unrecoverable.

So the next stage in the evolution of undelete was a separate directory used to hold deleted files. A deleted file was simply moved from its original directory to a hidden directory. Undeleting the file became a trivial matter of moving the file back to its original location.

Which brings us to the state of the art in undeletion technology: the Windows 98 Recycle Bin, The Recycle Bin works by setting up hidden folders named Recycled on each of your disk drives. When you delete a file, the Recycle Bin moves the file to the appropriate Recycled folder. When you restore a file, the Recycle Bin moves it back to its original folder. The next few sections discuss the Recycle Bin in more detail.

Sending a File or Folder to the Recycle Bin

When you decide to blow away a file or folder, Windows 98 gives you lots of choices on how to proceed. Here's the rundown:

For the first four methods, Windows 98 displays a dialog box asking you to confirm that you want to send the file or folder to the Recycle Bin, as shown in Figure 14.27. If you're sure, click Yes; otherwise, you can bail out by clicking No.

FIGURE 14.27.
When you delete a file, Windows 98 displays this dialog box to ask for confirmation.

 

FLOPPY AND NETWORK DRIVE DELETIONS ARE PERMANENT

If you delete a file from a floppy disk or a network drive, Windows 98 does not send the file to the Recycle Bin (even if you drop the file on the Recycle Bin icon). Instead, Windows 98 deletes the file permanently.

 

BYPASSING THE RECYCLE BIN

If you're sure you won't ever need to restore the file, you can delete a file or folder permanently (that is, without placing it in the Recycle Bin) by holding down the Shift key while you delete it. What happens if you use this technique and then decide that you need The file restored? Are you out of luck? Maybe not. You can try using the DOS UNDELETE command to recover the file. I'll show you how this works in Chapter 23, "DOS Isn't Dead: Unleashing the DOS Shell."

Restoring a File from the Recycle Bin

It's axiomatic in computer circles that there are two kinds of users: those who have accidentally deleted the wrong file, and those who will. When this happens to you, it's nice to know that the Recycle Bin is there to bail you out.

Actually, before learning how to restore files from the Recycle Bin, you should know that there's an easier way. If the deletion was the last action you performed, you can reverse it by selecting Edit I Undo Delete, or by right-clicking an empty part of the Contents list and selecting Undo Delete from the context menu.

The Undo command applies only to the last action you performed, however, so Undo Delete might no longer be available by the time you realize your mistake. No problem, though. You can still recover the file or folder by following these steps:

  1. Display the contents of the Recycle Bin either by highlighting the Recycle Bin folder in Explorer or by double-clicking the Recycle Bin icon on the desktop.
  2. Highlight the file or folder you want to restore.
  3. Select File I Restore, or right-click the file or folder and select Restore from the context menu. Windows 98 restores the file or folder to its original location.

CLEANING OUT THE RECYCLE BIN

The Recycle Bin contents take up disk space, of course. If you need to free up some disk real estate, you have a couple of choices. If you want to expunge one or more Recycle Bin objects permanently, highlight it and select File I Delete, or right-click it and click Delete. When Windows 98 asks whether you want to delete the object, click Yes. Alternatively, you can clean out the Recycle Bin entirely either by highlighting the Recycle Bin folder and selecting File I Empty Recycle Bin, or by right-clicking the Recycle Bin icon and selecting Empty Recycle Bin from the context menu.

Setting Recycle Bin Properties

To give you a measure of control over how the Recycle Bin operates, various properties are available for you to work with. To check out these properties, either highlight the Recycle Bin and select File I Properties, or right_click the Recycle Bin icon and select Properties from the context menu. You see a Recycle Bin Properties dialog box similar to the one shown in Figure 14.28.

FIGURE 14.28.
Use this dialog box to set some Recycle Bin properties.

For starters, you need to decide whether you want to configure the Recycle Bin settings for each drive independently or globally (assuming, of course, that your system has multiple drives). For example, if you have a drive that's perilously low on disk space, you probably want to configure the drives independently so that you can tailor the amount of disk space that the Recycle Bin uses.

If you want to configure the drives globally, activate the Global tab's Use one setting for all drives option button. You can then manipulate two settings that apply to all your hard disk drives:

Do not move files to the Recycle Bin. Remove files immediately when deleted: Activate this option to bypass the Recycle Bin for all deletions.
Maximum size of Recycle Bin (percent of each drive):
This slider controls the maximum amount of hard disk acreage that the Recycle Bin usurps on all the drives. The default is 10 percent, which is probably a bit high (100MB on a 1GB drive!). Note, however, that the lower the value, the fewer files the Recycle Bin can store.

If you prefer to configure the drives separately, activate the Configure drives independently option button and then use the various drive tabs to adjust the settings for each drive.

Finally, the Global tab also has a Display delete confirmation dialog check box. If you deactivate this option, Windows 98 doesn't prompt you for confirmation when you select the Delete command or press the Delete key.

When you're done, click OK to put the settings into effect.