Windows has some built-in features to protect you from
accidental file deletions, but often they're not enough. For
general information on file deletion in Windows, see the previous topic.
When you delete a file in Windows Explorer, you can immediately
undelete it from the Edit menu. If, however, you perform another
file operation after you delete the file, you're out of luck unless
it's in the Recycle Bin.
The Recycle Bin
The Recycle Bin is a special set of folders that are located in
a hidden folder or file (C:\$Recycle.Bin for Windows Vista,
C:\recycler for Windows 2000, NT, and XP, or C:\recycled for
Windows 98).
When you (or certain Windows programs) delete a file normally,
Windows copies the file data (the index entry and the contents) to
the Recycle Bin folder as D<drive><#>.<extension>
(for example, DC3.txt). It also writes the original name and
original location of the file into a hidden index file called
info2.
When you view the Recycle Bin from the Desktop or from Windows
Explorer, Windows displays the original file name and location
using the information in the info2 index.
If you restore a file by right-clicking it in the Recycle Bin
and then clicking Restore, the file contents are
copied back into the previous filename location using info2 as an
index.
If you delete a file from the Recycle Bin or empty the Recycle
Bin, the reference to it in info2 is deleted, but the contents of
the file still remain on the hard drive until they are overwritten
by other files.