How to access recycled files from the DOS / command prompt

Status
Not open for further replies.

microsoftne

In Runtime
Messages
469
How to access recycled files from the DOS / command prompt
See Also
• Delete files with the ability to undo or recycle (Programming tip)
• Would you rather call it a "Trash Can?"

As you may know, all the files and shortcuts you delete in Windows now goes to the "Recycle Bin." It's easy enough to "undelete" or "recycle" files in the "Recycle Bin" from Windows, but here's how to access them from a "DOS Prompt" or a "Command Prompt:"


Go to the "DOS Prompt" or "Command Prompt"

Change to the drive you want to access the recycled files for. For example, if you deleted a file from the drive C, it will go to the recycle bin on the C drive.

Change to the "RECYCLED" directory (this is a hidden directory which will not show-up on a regular DIR command).

For example:

CD \RECYCLED



Files in the "Recycled" directory are hidden as well, so apply the following command to make them visible:

ATTRIB -R -S -H *.*



Now you'll be able to use regular directory and file manipulation commands from the "Command Prompt" on recycled files:

DIR /A



Also note that there are two special files (which you can use any text editor to view):

DESKTOP.INI
INFO
 
Status
Not open for further replies.
Back
Top Bottom