Windows – Recovering folder from Recycle Bin in Windows 7 using command line tools

recycle-binwindows 7

I want to move all files in recycle bin folder to original location or desired location using command prompt.

How can I do this?

Best Answer

  1. Firstly open your command prompt
  2. MS-DOS window, the directory will be C:\Users\ (Your User Name) \ in Windows 7 and C:\Documents and Settings\ (Your User Name) \ in Windows XP
  3. cd../.. and press enter .
  4. cd $Recycle.Bin in Win7 or cd RECYCLER in WinXP and press enter.
  5. 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.
  6. 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.
  7. Here deleted a system file named "BOOTSECT.BAK". Its been renamed as "$I1R8ZP3.BAK"
  8. copy (The Name of the File) (The location) For eg., type copy $I1R8ZP3.BAK C:\
  9. cd../.. to go to the root directory.
  10. dir and enter. You'll see the file you copied from the Recycle Bin directory there
  11. ren (The Name of the File) (The Name You Want) For eg., type ren $I1R8ZP3.BAK BOOTSECT.BAK
  12. Thats great it! The file is restored. Restart your computer
Related Question