Recycle empties the trash from the command line

The Recycle Bin is fine for catching files you accidentally erase on your desktop, or while playing around in Explorer. But the command line, unfortunately, is a different story. Enter a “del *.*” in the wrong place and the files really are gone.

A good undelete tool will probably be able to recover them, of course (especially if you’re quick). But Recycle could help you avoid the problem in the first place, by providing a simple command line tool which that files by sending them to the Recycle Bin.

To get started with the program, unzip its download and copy Recycle.exe to \Windows\System32 (or any other folder on your path, if you prefer).

You can then delete individual files by specifying them directly.

  • recycle c:\users\mike\desktop\oldfile.txt
  • Using wildcards allows you to delete multiple files at once.

  • recycle c:\users\mike\desktop\*.txt

And there are lots of other interesting switches on offer here.

You can have Recycle prompt for confirmation before deleting anything, for instance.

The program is able to recover a file from the bin (although, annoyingly, you have to type in the full path as well as the file name).

There are options to delete a specific item from the bin, empty all bins on the system or just one in particular, and you get several more. Enter “recycle /?” at the command line for further details on exactly what you can do.

Photo Credit: Dirk Ercken/Shutterstock

Comments are closed.

© 1998-2024 BetaNews, Inc. All Rights Reserved. Privacy Policy - Cookie Policy.