A simple tool to rename, copy, or link media files to follow naming conventions.
- 📝 Rename files in place
- 📋 Copy files to a destination directory
- 🔗 Hard link files for space efficiency
- 🔗 Symbolic link files for flexible references
- 👁️ Dry run mode to preview changes before applying
- 🎯 Episode offset support for continuing seasons
- ✅ Comprehensive test coverage with 24+ tests
Download the binary from the releases page and add it to your PATH.
Or use cargo to install it:
cargo install --git https://github.com/arch-fan/rnmediaOr with Nix:
nix run github:arch-fan/rnmediaRename files in the same directory:
rnmedia --media "The Office" --season 1 season_path/The output will be something like:
[random_rip] The Office - Chapter 1.mkv -> The Office - S01E01.mkv (rename)
[random_rip] The Office - Chapter 2.mkv -> The Office - S01E02.mkv (rename)
[random_rip] The Office - Chapter 3.mkv -> The Office - S01E03.mkv (rename)
[random_rip] The Office - Chapter 4.mkv -> The Office - S01E04.mkv (rename)
[random_rip] The Office - Chapter 5.mkv -> The Office - S01E05.mkv (rename)
[random_rip] The Office - Chapter 6.mkv -> The Office - S01E06.mkv (rename)
If you want the files to be renamed, use the flag --apply:
rnmedia --apply --media "The Office" --season 1 season_path/Copy files to a different directory with new names:
rnmedia --media "Breaking Bad" --season 2 --destination /media/shows/ source_path/Create hard links instead of copying (saves disk space):
rnmedia --hardlink --media "Game of Thrones" --season 3 --destination /backup/ source_path/Create symbolic links for flexible file references:
rnmedia --symlink --media "Stranger Things" --season 1 --destination /linked/ source_path/Start numbering from a specific episode (useful for split seasons):
rnmedia --media "Attack on Titan" --season 3 --offset 12 season_path/
# Results in S03E13, S03E14, S03E15...$ rnmedia --help
Usage: rnmedia [OPTIONS] --season <SEASON> --media <MEDIA> <PATH>
Arguments:
<PATH> Path to the directory containing media files
Options:
-a, --apply Actually apply the new filenames (if not provided, just prints preview)
-s, --season <SEASON> Season number
-m, --media <MEDIA> Media title
-o, --offset <OFFSET> Episode offset [default: 0]
-l, --hardlink Create hard links instead of renaming/copying files
-L, --symlink Create symbolic links instead of renaming/copying files
-d, --destination <DESTINATION> Destination directory (for copy, hard link, or symbolic link operations)
-h, --help Print help
-V, --version Print versioncargo testcargo fmt
cargo clippy -- -D warningsnix build
./result/bin/rnmedia --help