A desktop application that watches a download folder and automatically extracts new RAR or ZIP archives when downloads finish. Built with Python and PyQt5.
- Watch & extract — Monitors a folder for new
.raror.zipfiles and extracts them when the download completes - Progress feedback — Progress bar and status messages during extraction
- Cancel — Cancel waiting or extraction at any time
- Delete after extraction — Optional checkbox to delete the archive from the download folder after a successful extraction
- Error handling — Validates folders before starting; shows clear errors if extraction fails (e.g. corrupt archive, permissions)
- Remember folders — Last-used download and extraction paths are saved and restored on next launch
- System tray — Minimize to tray; optional notification when extraction completes
- Supported formats — RAR and ZIP
- Python 3 or greater
- UnRAR (for RAR extraction) —
rarfileuses the systemunrarcommand. Install as needed:- macOS:
brew install unrar - Windows: Download UnRAR and add to PATH
- macOS:
-
Clone or download this repository:
git clone <repository-url> cd RAR_Automation
-
Create a virtual environment (recommended):
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
Or manually:
pip install rarfile PyQt5 -
Ensure the UI file
test.uiis in the same directory asmain.py. (If your file is namedmain.ui, either rename it totest.uior change theloadUi("test.ui", self)line inmain.pyto match.)
-
From the project directory, run:
python main.py
-
Set the directories in the app:
- Download folder — Folder where your browser or download manager saves files (e.g.
~/Downloads) - Extraction folder — Folder where extracted contents should go (e.g.
~/Extracted)
- Download folder — Folder where your browser or download manager saves files (e.g.
-
Click Start. The app will:
- Wait until it detects a new file in the download folder
- Wait for the download to finish (no temporary
.crfile) - Extract the new RAR or ZIP into a subfolder in the extraction directory
- Show a tray notification when extraction is complete
-
Start your download in the browser or download manager; the app will pick up and extract the new archive when it’s done.
- Only the first new RAR or ZIP that appears after clicking Start is processed per run. For another file, click Start again after setting directories.
- Closing the window with “Minimize to tray” checked hides the app to the system tray instead of exiting. Use the tray menu to Show or Exit.
- The app must stay running while the download is in progress so it can detect when the file is complete and then extract it.
RAR_Automation/
├── main.py # PyQt5 UI and worker thread (orchestration only)
├── extractor.py # Archive detection and extraction (no UI; reusable/testable)
├── requirements.txt # pip dependencies (rarfile, PyQt5)
├── test.ui # PyQt5 UI layout (must be present)
└── README.md
| Issue | Suggestion |
|---|---|
| “ModuleNotFoundError: No module named 'rarfile'” or “PyQt5” | Run pip install rarfile PyQt5 in the same environment you use to run python main.py. |
| RAR extraction fails | Install UnRAR (brew install unrar on macOS) and ensure unrar is on your PATH. |
| “Download hasn’t been started” forever | Confirm the download folder path is correct and that you’ve started a download into that folder. |
| UI doesn’t load | Ensure test.ui exists next to main.py, or update the loadUi(...) path in main.py to your UI filename. |