I have a rather large library of movies gathered over the years (all entirely legally I assure you officer). I’m in the process of setting up a Jellyfin server so I can stream them on the go.
Currently it’s just one folder full of individual files but Jellyfin wants each movie within it’s own folder.
Is there a command, or set of commands, that would do this all in one go? ie iterate my way through a folder, create a new folder with the same name as a file, move that file into this new folder and repeat a few hundred times.
I am using Cachy OS (arch) and have Dolphin and yazi as file managers if that helps. I guess a bash script would be the best way to achieve this but my skills are quite rusty.


Well, yes, but you can get exactly the same result by having well-named files as well. Having them well-named in general makes identification more reliable, regardless of whether it’s the full path or just the filename.
No, you can’t.
With my 500 movies and several hundred TV series, that does not work.
Jellyfin mis-identifies a significant portion of it doing this.
Only by using the named folders (with year and imdbid) does it get 90% right.
And I’ve had this across 5 Jellyfin servers in the last year - I’ve done a LOT of testing.