Restore Files From Recycle Bin Through Command Prompt

12/21/2011 09:13:00 PM , , , 24 Comments

Recycle bin is the place where the files go when you delete it in Windows. If you accidentally delete a file, you can recover it by going to the Recycle Bin and simply clicking Restore. What if you delete a system file and your system stops booting?! Well, one of my friend was in that situation! Thats why i'm writing this blog post. :-)

You can access Recycle Bin through MS-DOS also! The recycled files are stored in directory called "RECYCLER" in Window XP and "$Recycle.Bin" in Windows 7.

Step 1: To get into MS-DOS while booting, press F8. You'll see an option called "Safe Mode with Command Prompt". Select it and press enter.
Step 2: You'll be asked to select the Operating system to start. Select your OS and press enter.
Step 3: Next, you'll see the screen where you select your user. Select your user name.
Step 4: Now, in the MS-DOS window like below, the directory will be C:\Users\(Your User Name)\ in Windows 7 and C:\Documents and Settings\(Your User Name)\ in Windows XP
Step 5: Type cd../.. and press enter.
Step 6: Type cd $Recycle.Bin in Win7 or cd RECYCLER in WinXP and press enter.
Step 7: Type cd and press tab. You'll see that the line is filled with a directory name like this "S-1-5-21-564594560-2944949298-4040108220-1000". Press enter.
Step 8: Type dir/a to see all the files including hidden files in that directory. The file you want to recover will also be there. But the name of the file may be changed.
Step 9: Here I deleted a system file named "BOOTSECT.BAK". Its been renamed as "$I1R8ZP3.BAK"
Step 10: Type copy (The Name of the File) (The location)
For eg., type copy $I1R8ZP3.BAK C:\
Step 11: Type cd../.. to go to the root directory.
Step 12: Type dir and enter. You'll see the file you copied from the Recycle Bin directory there.
Step 13: Type ren (The Name of the File) (The Name You Want)
For eg., type ren $I1R8ZP3.BAK BOOTSECT.BAK
Step 14: Thats it! The file is restored. Restart your computer and enjoy the Graphic UI of Windows again! :P


A techie & mobile geek as said by most of the tech bloggers. Own Android devices and love it. So blogs will be mainly based on what i own. Amateur occasional blogger. Foodie with a good appetite for Indian food. Love to travel, drive alone with only country-folk-indie music as company.


  1. This was extremely helpful. Saved 10 years of work which I hadn't backed up on my computer and was about to lose because I deleted a driver in the registry by mistake.

    Thank you!

  2. ini yang gw cari2..makasih banyak gan.. :D

  3. @1st: you're most welcome.. :-)
    @2nd: english please.. :-))

  4. can i ask something i delete a .doc file today but if i try to retrieve it in the cmd the date 6/25/12 has no modified files where can i saw that .doc file so i can retrieve it tnx sir in advance godbless

  5. can i ask something is the $Recycle.Bin folder automatically deletes it's file inside of it because as i observed when i try to retrieve file using cmd i get it and i saw many deleted files but when i try to delete a file yesterday to the recycle bin it does'nt appear to the $Recycle.Bin folder so i can't retrieve it how can i see it and today when i go to the cmd the many deleted files in the $Recycle.Bin folder is gone and there are only 2 files remain that was deleted yesterday can i see agin the other deleted files and how i hope you understand my question tnx in advance

  6. @Kenneth: Recycle bin never deletes file on it own unless you enable the settings that does so. check properties of recycle bin for allocated space for deleted files in each drives. check for viruses also which deletes files from recycle bin.
    if you need to recover files which you accidentally deleted use any of the File Recovery/Partition Recovery softwares.
    (and btw, answering your question hoping that i understood it.. :D)

  7. Lets say I wanted to recover the whole of the recycle bin, how can i do this in some sort of loop ? Can you do a copy * c:/RecoveredFiles/
    And if you can how then do you do the ren part as you need to rename the file ??
    Pleas ehelp, trying to write a .bat file to do this. Bascially recovering files from the recycle bin to somwehere else.

  8. When I tried this on a winxp machine I was able to see my files and they were renamed to Dc3.doc Dc4.doc and so on. When I did the copy command it said the specified file could not be found

    Any hints?

  9. Win 8. Got the file back, still kept going to system restore or whatnot and didn't get back to GUI of win 8 OS. Had to use system restore, which worked.

  10. How can I recover permanently deleted -from recycle bin- audio files from using cmd?

  11. Even a file that’s no longer in the Recycle Bin can still be recovered. Windows doesn’t overwrite the actual ones and zeros until another file needs the drive space. If the data is critical, a professional data recovery service may be the best solution. There are commercially available recovery software programs that attempt to recover inaccessible data from damaged or corrupted optical disks.

  12. Does your software recover data from recycle bin on all versions of Windows OS? Last week I searched one tool named as Remo Recover that can recover data from recycle bin on all versions of Windows OS

  13. Thanks Rechard Luis as per your suggestion, I used Remo Recover tool and successfully recovered data from Recycle Bin on my Windows based computer within a short span of time....

  14. I deleted a file yesterday that I want to recover urgently. I am logged into XP using Guest account in my office.
    The above mentioned doesn't work as it demands admin access to do so.
    Can you please tell any way for a Guest account user to retrieve files.

    Thank You
    Thank Y

  15. how can i recover the all files from permanently deleted it is not in recycle bin by using command prompt?

  16. Thank you again! Still works with Windows 10! Accidentally deleted my "Windows.UI.Logon.pri" and it saved me all the time I would have had to spend on System Restore!

    1. i have same prb !! recycle bin not founding !!!!

  17. Does your photos deleted from recycle bin? Do you want to recover them? if yes then you are suggested to take help of photo recovery software. It is easy to use.

    For more detail

    photos deleted from recycle bin

  18. Yeah..It's a nice response. I too faced same situation Thanks to the Solution I get here.

  19. Really losing priceless data is annoying and panic moment. I too encounter same issue once my file too gets deleted but thanks to Data Recovery Software using which I able to recover them.

  20. Hi, I deleted logon.ui. when starting on cp back up after widows load screen i got: Logon process initialization failure, ive tried all the boots safe mode doesn't work and when i when, repair asked me for a user name and password then gave me a list of tools. Restore doesn't work on my cp it broke but i never fixed it, clicked command prompt, but says X:windows\system32 i haven't a clue how to access Users because it wont recognize C.

  21. Thank you for this post, will definitely try this. I currently using Disk Drill free version right now, but some of my recovered files are damaged.

  22. Hi Dear,

    I see your blog daily. your blog is very useful for me & i like so much..

    AUDBOS Double Driver In-ear Deep Bass Noise Isolating Earphones|Headphones|Earbuds with Mic and Remote (Silver Hoop)

    Buy Now High Quality Earphone with good sound :- AUDBOS K3 Triple Diver In-ear Earphones