Your movie folder looks like this:
π Movies/
βββ π The.Dark.Knight.2008.1080p.BluRay.x265.HEVC.AAC.5.1-BONE
βββ π Inception.2010.2160p.4K.UHD.BluRay.REMUX.HDR.HEVC.Atmos-TiGER
βββ π Interstellar.2014.REMASTERED.1080p.BluRay.x264.DTS-HD.MA.5.1-FGT
βββ π¬ Parasite.2019.1080p.BluRay.mkv β loose file, no folder!
βββ π Caspers.First.Christmas.1979.1080p.WEB.UPSCALE.MULTI.AAC.2.0.H.265-OldT
Ugly. Unreadable. A mess.
After running Movie Manager Pro:
π Movies/
βββ π¬ The Dark Knight 2008/ β with poster icon!
βββ π¬ Inception 2010/ β with poster icon!
βββ π¬ Interstellar 2014/ β with poster icon!
βββ π¬ Parasite 2019/ β auto-created folder + poster icon!
βββ π¬ Caspers First Christmas 1979/ β with poster icon!
Clean. Beautiful. Every folder has its movie poster as the icon. πΏ
|
|
|
|
| Requirement | Details |
|---|---|
| OS | Windows 10 / 11 |
| PowerShell | 5.1+ (pre-installed on Windows) |
| TMDb Account | Free API key from themoviedb.org |
1. Clone this repository (or download the script):
git clone https://github.com/yourusername/movie-manager-pro.git
cd movie-manager-pro2. Get your free TMDb API key:
- Create a free account at themoviedb.org
- Go to Settings β API β Create β Request an API key
- Copy your API Read Access Token (the long one starting with
eyJ...)
That's it. No other dependencies required. π
# Run the script
powershell -ExecutionPolicy Bypass -File movie_manager.ps1Or right-click movie_manager.ps1 β Run with PowerShell
When you launch the script, you'll see a beautiful interactive menu:
.----------------------------------------------------------.
| |
| [1] Folder Renamer |
| Clean up messy folder names to Title Year |
| Move loose files into their own folders |
| Works for Movies & TV Series |
| |
| [2] Poster Icon Setter |
| Fetch posters from TMDb (Movies & TV) |
| Set them as custom folder icons |
| |
| [3] Full Auto (Rename + Set Icons) |
| Run both tools in sequence |
| |
| [0] Exit |
| |
'----------------------------------------------------------'
Cleans up messy folder names and organizes loose files.
Enter your choice: 1
Enter the folder path (or drag & drop a folder here):
> E:\Movies
What type of content is in this folder?
[1] Movies
[2] TV Series
> 1
Before & After Examples:
| Before | After |
|---|---|
The.Dark.Knight.2008.1080p.BluRay.x265-BONE |
The Dark Knight 2008 |
Inception.2010.2160p.4K.UHD.BluRay.REMUX |
Inception 2010 |
My Mister - MkvDrama.net |
My Mister |
Sherlock.S01-S04 |
Sherlock |
Sisyphus.The.Myth.S01E01.720p.10bit.WEBDL |
Sisyphus The Myth |
Note: Only folder names are changed β file names inside are never touched.
Fetches movie/TV posters from TMDb and sets them as folder icons.
Enter your choice: 2
Enter the folder path (or drag & drop a folder here):
> E:\Movies
What type of content is in this folder?
[1] Movies
[2] TV Series
> 1
Saved API token found: eyJhbGciOiJIUzI1...
Use saved token? [Y/n]: Y
[ββββββββββββββββββββββββββββββ] 90% (27/30)
Interstellar 2014
Searching: 'Interstellar' (2014)
Found: Interstellar (2014-11-05)
Icon set! β
Runs the Folder Renamer first, then the Poster Icon Setter β one command does everything.
Enter your choice: 3
Enter the folder path (or drag & drop a folder here):
> E:\TV Series
What type of content is in this folder?
[1] Movies
[2] TV Series
> 2
// Renaming happens first...
// Then icons are fetched and applied...
// Done! π
graph LR
A["Raw Name:<br/>The.Dark.Knight.2008.1080p.BluRay.x265-BONE"] --> B["Replace . _ with spaces"]
B --> C["Strip website names"]
C --> D["Find year (2008)"]
D --> E["Cut everything after year"]
E --> F["Clean Result:<br/>The Dark Knight 2008"]
The script uses a curated list of 60+ technical keywords to identify where the title ends and the junk begins:
- Quality:
1080p,2160p,720p,4K - Source:
BluRay,WEBRip,WEB-DL,HDRip,DVDRip - Codec:
x264,x265,HEVC,AVC,H.265 - Audio:
AAC,DTS,Atmos,FLAC,AC3 - Tags:
REMASTERED,EXTENDED,UNRATED,HDR - Groups:
BONE,YTS,RARBG,Tigole,TiGER - Sites:
MkvDrama.net,YTS.MX,pahe.in
graph TD
A["π Folder Name"] --> B["Parse title & year"]
B --> C{"Search TMDb API"}
C -->|Movie| D["GET /3/search/movie"]
C -->|TV| E["GET /3/search/tv"]
D --> F["Download poster (500px)"]
E --> F
F --> G["Convert to 256Γ256 ICO"]
G --> H["Save as folder.ico"]
H --> I["Create desktop.ini"]
I --> J["Set folder attributes"]
J --> K["πΌοΈ Custom icon visible!"]
On first run, the script saves your TMDb token to movie_manager_config.json in the same directory:
{
"TMDbToken": "eyJhbGciOiJIUzI1NiJ9..."
}Security Note: This file contains your API token. Add it to
.gitignoreif you're pushing to a public repo.
The following file types are recognized as media files when organizing loose files:
.mkv .mp4 .avi .mov .wmv .flv .webm .m4v .ts .mpg .mpeg
Archive files (.zip, .rar, .7z) are also organized.
- β Only renames folders β files inside are never modified
- β Non-destructive β no data is deleted, just reorganized
- β Idempotent β safe to re-run; skips already-clean folders and existing icons
- β No admin required β runs with standard user permissions
Icons aren't showing up in Explorer?
Press F5 to refresh, or restart Windows Explorer:
Stop-Process -Name explorer -Force; Start-Process explorerWindows caches folder icons aggressively. A restart of Explorer will force it to reload.
Can I undo the renaming?
The script doesn't create a log of old names (yet). If you want to preview changes first, you can add a -WhatIf dry run mode. For now, make sure you're happy with a small test before running on your entire library.
A movie/show wasn't found on TMDb?
This usually happens when:
- The folder name has a typo (e.g.,
sillicon valleyβSilicon Valley) - The title is too obscure or it's a bonus feature / documentary
- The folder was already named incorrectly before renaming
Fix the folder name manually and re-run β the script will pick up any folders without icons.
Does it handle non-English titles?
Yes! TMDb has excellent international coverage. Titles in Korean (νκ΅μ΄), Turkish, Japanese, etc. are fully supported. The script preserves Unicode characters in folder names.
Can I use this on a NAS or external drive?
Yes, as long as the drive is mounted as a Windows drive letter (e.g., E:\). Just provide the path when prompted. Note that folder icons using desktop.ini are a Windows feature and may not be visible from other OS clients accessing the NAS.
- Dry-run / preview mode
- Undo / rollback with rename log
- Anime support (AniList/MyAnimeList integration)
- Batch processing multiple directories
- GUI version (WPF/WinForms)
This product uses the TMDb API but is not endorsed or certified by TMDb.
![]()
If this saved you hours of manual organizing, give it a β!
Made with πΏ by a fellow movie hoarder