Skip to content

6K6666/unrar-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

unrar-script

Batch extract multi-part .rar archives (including .r00, .r01, … pieces) and remove the archive files once the extracted video shows up.

Requirements

  • 7-Zip command line tool (7z) installed and available in your PATH.
  • Python 3.8 or newer.

Usage

python batch_unrar_clean.py /path/to/"tv shows"

This command:

  1. Walks through every subdirectory underneath the root.
  2. Extracts each .rar archive (skipping any part2, part3, … files so they are only processed once).
  3. Looks for new video files (.mkv, .mp4, .avi, .mov, .wmv, .flv, .ts, .m4v by default). Only when a new video appears do the archive parts get deleted, giving you a safety net for corrupt archives.

Options

  • --dry-run — show what would be done without extracting or deleting files.
  • --extractor PATH — use a different command than 7z (e.g. 7zz on some systems).
  • --video-ext EXT — watch for additional video extensions (use multiple times if needed). Example: --video-ext webm.

Tip: On Linux/macOS install the extractor via sudo apt install p7zip-full or brew install p7zip respectively.

About

unrar all .rar files in a directory and it's subdirectories

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages