Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

This question already has an answer here:

Under Windows if I create a file and delete it, than recreate the exact copy of the file in the same place and delete it too, than I will have 2 identical files in the recycle bin with the same name. Where does the system knows which one is which? How can there be two files with the same name? Isn't the recycle bin a kind of folder too? Does other operation systems do the same when we perform this method on them?

2 files with the same name in recycle bin

share|improve this question

marked as duplicate by Karan, Brad Patton, Dave, Dave M, Mokubai May 2 '13 at 16:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

The recycle bin cannot, and does not, hold information about multiple files with the same name. It does, however, information about multiple files with the same name. So long as it doesn't store the file's original name in the file name, this doesn't cause the recycle bin to hold multiple files with the same name. So there's a million ways to make this work and one way to make it not work -- they just don't do it the one way that wouldn't work. – David Schwartz May 1 '13 at 9:50
up vote 6 down vote accepted

The Recycle Bin is not a "normal" folder and, thus, does not have to abide by the same rules you know from regular folders.

When you delete a file, the entry for that file in the file system is marked as deleted. The file itself (or, to be more precise, the data contained in the file) remains in place. Windows will then put a new entry into the file system with a new file name. This entry will refer to the same location in the file system where the original file was located. Additionally, it will keep a reference to the original, deleted file.

If we take a look at the actual contents of the Recycle Bin folder, we see this:

C:\$Recycle.Bin>dir /a
 Volume in drive C is System
 Volume Serial Number is 7461-FCF4

 Directory of C:\$Recycle.Bin

2013-01-30  16:53    <DIR>          .
2013-01-30  16:53    <DIR>          ..
2013-01-30  16:53    <DIR>          S-1-5-20
2011-11-29  15:28    <DIR>          S-1-5-21-2370250818-2711005194-4184312249-1165
2013-04-30  14:36    <DIR>          S-1-5-21-395480114-2448312134-3943194674-1000
               0 File(s)              0 bytes
               5 Dir(s)  74,019,328,000 bytes free

This shows me the folders that were deleted from my C: drive. If I look into one of those folders, I can see the deleted files with their new names:

C:\$Recycle.Bin>dir S-1-5-21-2370250818-2711005194-4184312249-1165
 Volume in drive C is System
 Volume Serial Number is 7461-FCF4

 Directory of C:\$Recycle.Bin\S-1-5-21-2370250818-2711005194-4184312249-1165

2011-11-29  15:04               544 $I8CQG1I.old
2011-11-29  15:04               544 $IB7OVE3.attr
2011-11-29  15:28               544 $ICLKJI9.csr
2011-11-29  15:28               544 $IJS204F.csr
2011-11-29  15:04               544 $IMBRKUS.old
2011-11-29  15:04               544 $IURO2ZD.old
2011-11-29  15:04               544 $IV2TEJ7.pem
2011-11-29  15:04               544 $IWDACDF.pem
2011-11-29  14:37                21 $R8CQG1I.old
2011-11-29  14:41                21 $RB7OVE3.attr
2011-11-29  14:35               538 $RCLKJI9.csr
2011-11-29  15:11               364 $RJS204F.csr
2011-11-29  14:37                37 $RMBRKUS.old
2011-11-29  14:37                 3 $RURO2ZD.old
2011-11-29  14:41             2,613 $RV2TEJ7.pem
2011-11-29  14:37             2,973 $RWDACDF.pem
              16 File(s)         10,922 bytes
               0 Dir(s)  73,465,004,032 bytes free

So, you see, the 2 deleted files in your Recycle Bin are 2 unique instances that don't conflict with each other (although, there would be a conflict if you tried to restore both at the same time).

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.