Deleting and Undeleting Files

by Eric Moore

 

Introduction

Deleting unwanted files and folders is a good method of housekeeping for your computer.  If an item is not needed, such as an outdated resume, an application file left by a program you have uninstalled, or an unused folder, deleting it will return the disk space for that item for storing other files and folders.

If not done wisely, deleting something from your computer can cause you grief.  As a rule, it is a good idea to frequently back up critical files as insurance against disaster.  Be sure you correctly selected the items to be deleted!  By default, Microsoft Windows will ask you to confirm whether to delete the selected items.  If you are not certain as to what a file contains or if it is required for Windows or a program to function properly, play it safe and do not delete it until you have more information, or else first back it up to another drive or folder in the event you must recover it at a later time.  Identifying the file may be a matter of opening it in a program such as Notepad or WordPad to view its contents, or in the case of an application file, contacting Microsoft or the software vendor to verify if it is safe to delete.

 

Conventions Used

These instructions usually assume you are searching for files, although in most cases they apply to folders as well.  In some cases I may use the term "item" to generically refer to a file or folder.

All instructions involving the mouse will assume the user has a right-handed mouse.  For a left-handed mouse, the user should left-click when the instructions say to right-click and vice versa.  If a specific button (left or right) is not specified, the left button is assumed.

The labels for menus and Windows dialog controls, such as buttons and tabs, are printed in italics.

The labels for keys on the keyboard are printed in capital letters.  For example, the key for deleting text would be indicated as DELETE.

Instructions for navigating menus will the summarized by listing the main menu and submenu options in italics, separated by small dots.  For example, to open the Windows Control Panel from the Start menu, you would click Start, click Settings, and then click Control Panel.  The notational shorthand I would use in this instance would be:  Start · Settings · Control Panel.

 

Configuring the Recycle Bin

The Recycle Bin in Windows 95, 98, and Me is a special hidden folder for temporary storage of deleted files and folders.  By default, any items you delete through the Windows interface will be moved to the Recycle Bin for storage until it is permanently deleted or purged.  When an item is purged, it is removed from the Recycle Bin and the disk space is released for storing other files and folders in the future.  The default behavior of the Recycle Bin may be overridden a number of ways.

To access the configuration options for the Recycle Bin, right-click the Recycle Bin on the Windows desktop or from within Windows Explorer and select Properties.  You will see a series of tabs that allow you to set the properties globally for all drives, or for each drive individually (See Figure 1).

FIGURE 1: Recycle Bin Properties

Under the Global tab, you may select what percentage of the hard drive to reserve for the Recycle Bin.  The larger the percentage, the more files that can be stored in the Recycle Bin before they are purged to make room for more recently deleted files.  It also determines the largest file that can be stored in the Recycle Bin.  For instance, if your hard drive as 2GB of disk space and the Recycle Bin is set to use 10% of your disk space, then the total space reserved for the Recycle Bin is approximately 200MB.  In other words, you may delete up to 200MB of files (whether hundreds of separate files or a single 200MB file) before Windows begins purging items to make room for later deletions.

It is important to remember if you choose to delete a file that is larger that the space reserved for the Recycle Bin, Windows will warn you that it cannot store it in the Recycle Bin.  Also, if the Recycle Bin is "full" and a new item is deleted, some items in the Recycle Bin will be purged to make room for the newly deleted item.  Once an item is purged from the Recycle Bin, you MAY NOT be able to recover it!

If you wish to disable the Recycle Bin altogether, select the option in the Recycle Bin properties to remove files immediately when deleted (See Figure 1).

By default, Windows will warn you when you proceed to delete an item.  I recommend leaving this setting enabled as insurance against any accidental deletions.  Uncheck this option only if you do not want Windows to display the delete confirmation dialog box.

If you want the settings in the Global screen to be applied equally to all hard drives, select the option to Use one setting for all drives.  If you wish to use different settings for each drive, select the option to Configure drives independently.  If you select the option to configure each drive independently, then you will be able to set the Recycle Bin configuration for each drive by using the other tabs in the Recycle Bin Properties (See Figure 2).

FIGURE 2: Recycle Bin Properties for D:

 

Deleting Files and Folders

You may delete one or more files and folders through Windows Explorer in one of several ways:

  1. Right-click the item to display the context menu and select Delete (See Figure 3)

  2. Left-click the item once and select File · Delete from the Windows Explorer menu (See Figure 4)

  3. Left-click the item once and press the DELETE key

  4. Drag the item to the Recycle Bin on the Windows desktop or within Windows Explorer

FIGURE 3: Deleting a file through the context menu

 

FIGURE 4: Deleting a file through the Windows Explorer File menu

If you do not want Windows to move the item to the Recycle Bin, then hold down the SHIFT key while deleting the item in any of the aforementioned ways.  Depending on whether the file will be moved to the Recycle Bin, one of two confirmation dialogs will appear.  If the file is to be moved to the Recycle Bin, the dialog will display a picture of the Recycle Bin (See Figure 5).

FIGURE 5: Confirmation to moving a file to the Recycle Bin

If the file will not be moved to the Recycle Bin, the dialog will display a picture of a disintegrating file and folder (See Figure 6).

FIGURE 6: Confirmation to permanently delete a file

As a general rule, Windows will move the item to the Recycle Bin, disk space permitting.  If the Recycle Bin is not large enough to store the item, Windows will display a dialog that explains the problem and asks if you wish to permanently delete the item (See Figure 7).  

FIGURE 7: Confirmation to permanently delete a file that is too big for the Recycle Bin

A group of files may be selected a number of ways through Windows Explorer or on the Windows desktop:

  1. A series of files may be selected by left-clicking the first file name and then holding down the SHIFT key while left-clicking the last file name.  Windows will then highlight all files in between the first and last.

  2. Individual files may be selected one-by-one by holding down the CONTROL key while left-clicking each file name.

  3. A group of files may be selected by holding down the SHIFT key and the left mouse button while dragging the mouse.  This will draw a dotted rectangular border that you can use to "lasso" the files to be selected.

Once the items have been selected, delete them.

 

Undeleting Files and Folders

A deleted item may be undeleted (restored) through the Recycle Bin if it has not been purged.  To undelete an item, double-click the Recycle Bin icon on the Windows desktop or in Windows Explorer to display a window with a list of contents (See Figure 8).

FIGURE 8: Contents of the Recycle Bin

The items may be sorted by Name, Original Location, Date Deleted, Type, and Size by left-clicking the appropriate column title.  You may also change the sorting method and other display properties by selecting from the options under the View menu in Windows Explorer, or by right-clicking a blank space within the window to access the context menu (See Figure 9).  

FIGURE 9: Context menu for changing the sorting method

When you find the item to undelete, right-click the item and select Restore from the context menu, or select File · Restore from the Windows Explorer menu (See Figure 10).

FIGURE 10: Context menu for restoring a file

There are cases where you will not be able to undelete a file/folder through the Recycle Bin:

  1. You deleted the file from the MS-DOS prompt

  2. You deleted the file from removable media, such as a floppy disk or CD-RW disk

  3. You deleted the file from a network drive

  4. The item has been purged from the Recycle Bin, either manually by the user or automatically by Windows

  5. The file was too large to be stored in the Recycle Bin

  6. Windows has been configured not to save deleted files to the Recycle Bin

Items deleted from a network drive generally cannot be recovered.  For more assistance, you should speak with your network administrator.

Items deleted from a local hard drive may be recoverable with special file utilities that run under MS-DOS or Windows.  You may also be able to recover deleted items from removable media such as floppy disks and Zip disks, depending on whether the disk has been subsequently reformatted.

Be forewarned that once an item has been deleted and is no longer stored in the Recycle Bin, the chances of recovering the file diminish over time.  Eventually Windows will reuse the disk space that was used by the file.  Once this happens, little or none of the file may be recoverable.

 

Undoing a Copy or Move

If you wish to undo a deletion, you may immediately do so through Windows Explorer by selecting Edit · Undo Delete or by pressing CTRL+Z. Be sure to note what the Undo option will do, as it also tracks other file operations such as renaming, copying, and moving items.

 

Manually Purging Files from the Recycle Bin

Over time, Windows will automatically purge items from the Recycle Bin when necessary to create space for more recently deleted items.  You may also purge some or all items from the Recycle Bin.

To purge only some items, first open the Recycle Bin by double-clicking it.  Then either click once on the item and press the DELETE key (or select File · Delete), or right-click the item and select Delete from the context menu.  Windows will then display a dialog confirm if you wish to permanently delete the item.

To purge all items, right-click the Recycle Bin and select Empty Recycle Bin from the context menu (See Figure 11).  Windows display a dialog telling you how many items are in the Recycle Bin and asking you to confirm whether you wish to delete all of them.

FIGURE 11: Emptying all items from the Recycle Bin