The easiest way to keep your media library subtitle-clean.
____ _ ____ _
/ ___| _ _| |__ / ___| ___ _ __ _ _| |__
\___ \| | | | '_ \\___ \ / __| '__| | | | '_ \
___) | |_| | |_) |___) | (__| | | |_| | |_) |
|____/ \__,_|_.__/|____/ \___|_| \__,_|_.__/
Subtitle Management Utility v1.1
Made by Chops Garbage Collection
SubScrub helps you organize subtitle files in your media library by automatically archiving non-English (or non-preferred language) subtitles while keeping your preferred language files in place.
Perfect for Plex, Jellyfin, Emby, or any media server!
- π Hybrid Language Selection - Command line or interactive prompts
- ποΈ 23+ Built-in Languages - Automatic variant detection (spa β spanish, spa, es, es-mx)
- π Duplicate Detection - Finds and removes duplicate subtitle files
- π¦ Smart Archiving - Preserves folder structure in backup
- π― Multi-format Support - .srt, .vtt, .ass, .sub, .ssa
- π§ͺ Dry Run Mode - Preview changes before committing
- π Detailed Logging - TXT and CSV reports
- π§Ή Empty Folder Cleanup - Removes folders left behind
- π Network Drive Compatible - Works with NAS/SMB shares
- Download the latest release
- Extract the ZIP file
- Double-click
SubScrub-v1.1 - Answer the prompts
- Choose Dry Run for your first time
# Spanish subtitles
SubScrub.bat spa
# French subtitles
SubScrub.bat fre
# German subtitles
SubScrub.bat ger# PowerShell
.\SubScrub-v1.1.ps1 -Language spaBeginner-Friendly (Recommended):
- Download
SubScrub-v1.1from Releases - No installation required - just run it!
Power Users:
- Clone this repository
- Run
SubScrub-v1.1directly with PowerShell - Or use
SubScrub-v1.1for easy launching
- Windows 7/8/10/11
- PowerShell 5.1+ (built into Windows)
- No admin rights required
SubScrub includes built-in mappings for 23+ languages:
| Code | Language | Code | Language | Code | Language |
|---|---|---|---|---|---|
| eng | English | spa | Spanish | fre | French |
| ger | German | ita | Italian | por | Portuguese |
| jpn | Japanese | chi | Chinese | kor | Korean |
| rus | Russian | ara | Arabic | pol | Polish |
| dut | Dutch | swe | Swedish | nor | Norwegian |
| dan | Danish | fin | Finnish | gre | Greek |
| tur | Turkish | heb | Hebrew | hin | Hindi |
| tha | Thai | vie | Vietnamese |
Don't see your language? No problem! Enter any language code during interactive mode.
You have a library with Spanish content and want to keep Spanish subs:
Interactive Mode:
Keep English as your primary language? (y/n): n
Enter your primary language code: spa
Result: Keeps spanish, spa, es, es-mx, es-es
Archives all other languages
Command Line:
SubScrub.bat spaYou want to keep BOTH English and Spanish:
Interactive Mode:
Keep English as your primary language? (y/n): y
Add additional language codes to KEEP? spa
Result: Keeps English + Spanish
Archives all others
SubScrub.bat jpnKeeps: japanese, jpn, ja, ja-jp
Archives: All other languages
- Scans your media directory for subtitle files
- Analyzes filenames for language codes
- Detects duplicate subtitles
- Keeps subtitles matching your language preference
- Archives all other subtitles to a backup folder (structure preserved)
- Cleans empty folders (optional)
- Logs everything in detailed reports
KEPT:
- Files matching your selected language(s)
- Example:
movie.eng.srt,show.en.srt,video.english.srt
ARCHIVED:
- All other subtitle files
- Example:
movie.spa.srt,show.fre.vtt,video.ger.ass
After running SubScrub, you'll find:
C:\Backups\Media_Subtitles\Backup_20240214_153217\
βββ archive_log.txt β Detailed log with timestamps
βββ subtitle_archive_report.csv β CSV report (if generated)
βββ [Your folder structure] β Archived subtitle files
Desktop:
subtitle_archive_report_20240214_153217.csv β Copy of CSV report
- β Dry Run Mode - Preview before making changes
- β Confirmation Prompts - Script asks before major operations
- β Detailed Logging - Track every file moved
- β Backup Preservation - Files are moved, not deleted
- β Easy Restoration - Folder structure maintained for easy recovery
# Specify language via parameter
.\SubScrub.ps1 -Language spa
# Batch file equivalent
SubScrub.bat spaSubScrub can be automated for scheduled cleanup:
Windows Task Scheduler:
Program: powershell.exe
Arguments: -NoProfile -ExecutionPolicy Bypass -File "C:\Scripts\SubScrub.ps1" -Language spa
Not in the built-in list? Just enter your code:
Enter your primary language code: tgl
Result: Uses "tgl" for Tagalog subtitles
Solution: Use SubScrub.bat instead (no antivirus issues)
Check: Filename must contain language code (e.g., movie.eng.srt)
Solution: Add alternative codes when prompted
Note: Normal on network drives - Windows holds file handles briefly
Solution: Script includes 100ms delay to help. You can delete manually if needed.
- Navigate to your backup folder
- Find the timestamped backup (e.g.,
Backup_20240214_153217) - Copy files back to original locations (check
archive_log.txtfor paths)
Create the .exe:
Install-Module ps2exe -Scope CurrentUser
Invoke-ps2exe -InputFile "SubScrub-v1.1.ps1" -OutputFile "SubScrub.exe" -title "SubScrub v1.1" -version "1.1.0.0"Requirements:
- PowerShell 5.1+
- PS2EXE module (for creating .exe)
- β¨ Hybrid language selection system (command line + interactive)
- β¨ Built-in mappings for 23+ languages
- β¨ Enhanced Step 2 with clearer default language indication
- π Comprehensive documentation suite
- π Fixed case-sensitive path handling
- π Fixed uninitialized variable crash
- π Added network drive stability (100ms delay)
- π Enhanced CSV archival (dual location)
- π¨ Green progress bar
- π Enhanced logging with timestamps and file details
See CHANGELOG.txt for complete history.
Contributions are welcome! Please feel free to submit a Pull Request.
- Additional language mappings
- GUI version
- Linux/macOS support
- Additional subtitle formats
- Issues: GitHub Issues
- Documentation: See included README.txt and USAGE_EXAMPLES.txt
If SubScrub helped organize your media library, please consider:
- β Starring this repository
- π Reporting bugs or requesting features
- π’ Sharing with others who might find it useful
Made with β€οΈ for media enthusiasts everywhere
____ _ ____ _
/ ___| _ _| |__ / ___| ___ _ __ _ _| |__
\___ \| | | | '_ \\___ \ / __| '__| | | | '_ \
___) | |_| | |_) |___) | (__| | | |_| | |_) |
|____/ \__,_|_.__/|____/ \___|_| \__,_|_.__/
Subtitle Management Utility v1.1
==============================================
SubScrub v1.1
Intelligent Subtitle File Management
==============================================
STEP 1: Select Directory to Scan
Enter the directory path (Press Enter for default: 'Z:\Media'):
[OK] Scan path set to: Z:\Media
STEP 2: Configure Language Preferences
DEFAULT: English subtitles will be KEPT
(Files matching: english, eng, en, en-us)
Keep English as your primary language? (y/n) [y]: n
Common language codes:
spa (Spanish) fre (French) ger (German) ita (Italian)
por (Portuguese) jpn (Japanese) chi (Chinese) kor (Korean)
rus (Russian) ara (Arabic) pol (Polish) dut (Dutch)
Enter your primary language code: spa
[OK] Keep List set to: spanish, spa, es, es-mx, es-es
...processing...
==== FINAL STATISTICS ====
Files Kept: 127
Files Archived: 43
Duplicates Found: 8
Empty Folders: 2
Backup Location: C:\Backups\Media_Subtitles\Backup_20240214_153217
Archive Log: C:\Backups\Media_Subtitles\Backup_20240214_153217\archive_log.txt
==== ALL OPERATIONS COMPLETE ====