automatically rename and movie folder and movie file on Unraid
Posted: 10 Mar 2026, 23:24
Using filebot v26.02.3 (2026-02-22) on unraid 7.2.3.
Container paths:
\downloads\torrents\filebot-in
\downloads\torrents\filebot-out
1) Attempting to get it to automatically rename movie folder and movie file inside of filebot-in/Movies and then move to filebot-out/Movies folder. It's renaming the folder and movie file as well as successfully moving them, however, it's deleting all files in the original folder, instead of moving all files (nfo, jpg's) into movie folder inside of filebot-out/Movies. So the newly renamed movie folder inside of filebot-out/Movies only has the movie file. Note, that I don't want the original folder and contents deleted.
Just before posting here, I discovered this old post on the topic. However, since it's 14-years old I'm lead to believe it's outdated, so I did not review or try it.
viewtopic.php?t=215
2) It is also not using a custom preset flagged as default. To set as default I opened the edit "Movies" preset I created, then opened the format editor and selected "use format".
MY ATTEMPTS:
I worked with Chatgpt for hours trying various code in "Automated Media Center: Custom Options:". Here are a few we tried:
--def movieFormat="{ny} ({y})/{ny} ({y})" --def clean=n --apply import
--def movieFormat="{ny} ({y})/{ny} ({y})" --def clean=n --def subtitles=en --def exts="srt|jpg|nfo"
--def movieFormat="{ny} ({y})/{ny} ({y})" --def clean=n --def subtitles=en --apply import
--def movieFormat="{ny} ({y})/{ny} ({y})" --def clean=n --def subtitles=en --def artwork=y --def exts="srt|jpg|nfo"
ChatGPT also provided various User Bash Scripts. Here's the last one, but no luck:
Container paths:
\downloads\torrents\filebot-in
\downloads\torrents\filebot-out
1) Attempting to get it to automatically rename movie folder and movie file inside of filebot-in/Movies and then move to filebot-out/Movies folder. It's renaming the folder and movie file as well as successfully moving them, however, it's deleting all files in the original folder, instead of moving all files (nfo, jpg's) into movie folder inside of filebot-out/Movies. So the newly renamed movie folder inside of filebot-out/Movies only has the movie file. Note, that I don't want the original folder and contents deleted.
Just before posting here, I discovered this old post on the topic. However, since it's 14-years old I'm lead to believe it's outdated, so I did not review or try it.
viewtopic.php?t=215
2) It is also not using a custom preset flagged as default. To set as default I opened the edit "Movies" preset I created, then opened the format editor and selected "use format".
MY ATTEMPTS:
I worked with Chatgpt for hours trying various code in "Automated Media Center: Custom Options:". Here are a few we tried:
--def movieFormat="{ny} ({y})/{ny} ({y})" --def clean=n --apply import
--def movieFormat="{ny} ({y})/{ny} ({y})" --def clean=n --def subtitles=en --def exts="srt|jpg|nfo"
--def movieFormat="{ny} ({y})/{ny} ({y})" --def clean=n --def subtitles=en --apply import
--def movieFormat="{ny} ({y})/{ny} ({y})" --def clean=n --def subtitles=en --def artwork=y --def exts="srt|jpg|nfo"
ChatGPT also provided various User Bash Scripts. Here's the last one, but no luck:
Code: Select all
#!/bin/bash
# ===============================================
# Auto-Process FileBot Script for Unraid (Docker)
# Works with jlesage/filebot container
# Moves .mkv, .srt, .jpg, movie.nfo
# ===============================================
# Name of your FileBot container
CONTAINER_NAME="filebot"
# Input / output folders (mapped inside container)
SRC="/mnt/user/downloads/torrents/filebot-in/Movies"
DEST="/mnt/user/downloads/torrents/filebot-out/Movies"
# Loop over each folder in the input directory
for folder in "$SRC"/*/; do
[ -d "$folder" ] || continue # skip non-folders
# Run FileBot inside the container
docker exec "$CONTAINER_NAME" filebot -rename "$folder" \
--db TheMovieDB \
--format "{ny} ({y})/{ny} ({y})" \
--action move \
--output "$DEST" \
--def clean=n \
--def subtitles=en \
--def exts="mkv|jpg|srt|nfo" \
--def artwork=y
# Log success
echo "$(date): Processed folder $folder" >> /mnt/user/downloads/torrents/filebot-log.txt
done