ReNamed is a simple, terminal-based C tool that helps you automatically rename and organize episodes of TV shows β including specials β with clean, consistent filenames.
This utility scans a folder of video files (or optionally any files), detects the episode numbers using a variety of common patterns, and renames them based on a user-supplied show name. Special episodes (like OVAs, bonus content, or labeled βSPβ) are detected and moved into a separate Specials/
subfolder.
curl -O https://raw.githubusercontent.com/Panonim/ReNamed/refs/heads/main/main.c
gcc -o renamed main.c
./renamed
Attack on Titan
)Optionally put it inside /usr/local/bin to use it anywhere
You can use the following command-line flags:
-v
Show version info-h
Show usage instructions-f
Force mode β includes all files, not just video formats (.mp4
, .mkv
, .avi
)-p <path>
Specify custom output path-k
Keep original files (copy instead of rename)-d
Dry run mode - show what would happen without making changes--log[=file]
Create log file (default: renamed_log.txt)--pattern=<regex>
Specify custom regex pattern for episode detectionExamples:
# Force include all file types
./renamed -f
# Create a log file of all operations
./renamed --log
# Use a custom pattern for episode detection
./renamed --pattern='Season (\d+)-Episode (\d+)'
# Combination of options
./renamed -k -f --log -p /path/to/output
-f
When using the --log
option, ReNamed creates a detailed log file that includes:
This is especially useful for batch operations or when troubleshooting issues.
The --pattern
option allows you to specify your own regular expression for detecting episode numbers, which is useful for shows with unconventional naming. The pattern should include at least one capture group for the episode number.
Examples:
# For filenames like "Show.S01E05.mp4"
./renamed --pattern='S[0-9]+E([0-9]+)'
# For filenames with season and episode like "Show.S01-E05.mp4"
# (uses the second capture group)
./renamed --pattern='S([0-9]+)-E([0-9]+)'
Say you have:
Attack_on_Titan_E01.mkv
Attack_on_Titan_Special_01.mp4
Attack_on_Titan_E02.mkv
After running the tool, the folder becomes:
Attack on Titan - 01.mkv
Attack on Titan - 02.mkv
Specials/
Attack on Titan - 01 - Special.mp4
Β© 2025 Artur Flis. All Rights Reserved.