Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What does the Recycle Bin in Windows actually do? Is it just a glorified folder and a holding place for soon to be deleted files, or does it do something specific? Specifically, are files that are "moved" to the Recycle Bin actually moved on the hard disc, or are just the pointers to the files moved? I am a fairly experienced user, I just wanted a more depth explanation of the Recycle Bin.

share|improve this question
This is actually an interesting question. If the recycle bin were simple, it wouldn't take forever to add a folder with a few thousand files to it. – Daniel Beck Dec 17 '11 at 5:45
Start with the Wikipedia article. – William Jackson Dec 17 '11 at 5:47
Great question.. upvote – Fergus Jul 24 '13 at 16:56
The best info is always from the folks who actually write recovery software: . And also see… and… and – Pacerier Jul 9 '15 at 7:04
up vote 22 down vote accepted

The reference is removed, a metadata file is kept in the Recycle Bin to know the original location.

In the early days, on Windows 95 and 98 this was located in \RECYCLED. On Windows 2000 and later it was renamed to \RECYCLER. Since Windows Vista it is now a special folder called \$Recycle.Bin.

Use Process Monitor to see the I/O under the hood, put a filter on Recycle.Bin and visit it. :)

For example, when I do this:

notepad \$RECYCLE.BIN\S-1-5-21-0192837465-987654321-0123456789-1000\$EXAMPL5

Note: The long folder name is a User SID. The last folder name is a hash based on the metadata.

I get a file that contains metadata information like this:

                Ö¸ÌC : \ P a t h \ T o \ S o m e \ E x a m p l e . t x t

The reason that the file path has spaces in between is because it is stored in wide byte chars, to support special characters for certain languages as well as unicode and what else. The earlier symbols are binary and contain information like the file size and permissions, as well as a pointer to the file data. In essence, it contains enough information to reconstruct the original reference...

It's sad that the Windows Internals book doesn't cover this, or else I would've had more reference. I haven't found any articles that go into detail on this, neither by Microsoft or by third party people. They probably do exist but I found it easier to go and reverse engineer the main concept...

share|improve this answer
Nice, I just find out the hard way exactly what you've posted. Do you have any idea how to find your Example.txt from the command prompt? My use case is to search the entire drive for a misplaced file using dir c:\*.doc* /a/s but it doesn't find any docs in the recycle bin because of the renaming and the real name being kept in this metadata file. – Lieven Keersmaekers Feb 26 '15 at 7:12
That will probably involve findstr to grep the recycle bin contents. Dunno how though. – Tom Wijsman Feb 26 '15 at 8:27
Probably easier to update my expectations of dir /a/s :). tx Tom. – Lieven Keersmaekers Feb 26 '15 at 8:59
@TomWijsman, Weird, I can actually rename C:\$Recycle.Bin (tried on win8)! Is it safe to do so? – Pacerier Jul 9 '15 at 5:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .