Skip to content

cumulus13/recyclebin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Recycle Bin Manager (Python)

A simple command-line tool to manage the Windows Recycle Bin (Windows) using Python.
Features interactive mode, listing, restoring, deleting, and cleaning the recycle bin, with a colorful interface.

Features

  • List all items in the Recycle Bin with date, name, and full path.
  • Restore or permanently delete items by number, range, or list.
  • Clean (empty) the entire Recycle Bin.
  • Interactive mode with search/filter by filename.
  • Colorful output using rich.

Requirements

Install dependencies:

pip install rich rich-argparse winshell

Usage

python recyclebin.py [options]

Options

  • -l, --list
    List contents of the Recycle Bin.

  • -c, --clean
    Clean (empty) the Recycle Bin.

  • -i, --interactive
    Start interactive mode.

Interactive Mode

You will see a list of items in the Recycle Bin and a prompt:

please select number, [n]r = to restore number, [n1-nX]r to restore number n1 to nX, n1,n2,n3..r = to restore number n1,n2,n3,...,[n]d = to delete number, [n1-nX]d to delete number n1 to nX, n1,n2,n3..d = to delete number n1,n2,n3,..., [c] = clean/clear recycle bin, [q]uit/e[x]it = exit/quit or just type any to search/filter what you want:

Examples

  • 1r — Restore item number 1
  • 2-4d — Delete items 2 to 4
  • 1,3,5r — Restore items 1, 3, and 5
  • c — Clean (empty) the Recycle Bin
  • q or x — Exit interactive mode
  • Typing any text — Filter/search items by name

License

MIT License


Note: This script works only on Windows, as it uses the winshell library.

Author

Hadi Cahyadi

Coffee

Buy Me a Coffee

Donate via Ko-fi

Support me on Patreon

About

manage the Windows Recycle Bin (Windows) using Python

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages