this post was submitted on 14 Jun 2023
1 points (60.0% liked)

Open Source

30375 readers
939 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 5 years ago
MODERATORS
 

I have 291 episodes named tv.show.01.mp4 to tv.show.291.mp4 and i want rename them to be named like Tv Show Episode S01E01.mp4. I use Linux so please suggest only FOSS compatible programs

top 9 comments
sorted by: hot top controversial new old
[–] Immortal0861@beehaw.org 3 points 1 year ago

I use KRename for renaming multiple files.

[–] saint@group.lt 2 points 1 year ago (1 children)

how can you identify season from the file name?

[–] fubo@lemmy.world 1 points 1 year ago

One approach: Look up what TV show has 291 episodes; land on this Wikipedia page which gives you the season lengths.

[–] dart@lemmy.fmhy.ml 1 points 1 year ago

Please don't use spaces in your *nix filenames, that is just bad. To answer your question, use a bash script. Chatgpt can probably even make it for you if you don't know how to write it.

[–] Redscare867@lemmy.ml 1 points 1 year ago (1 children)

Why not just do this with a for loop in the terminal? I don’t think you need to over complicate it by downloading another program.

[–] zShxck@lemmy.ml 1 points 1 year ago

If I was able to do that i would not have asked here lol

[–] gmg@beehaw.org 1 points 1 year ago

There must be a million utilities to do this (try searching "linux mass rename"), including ones that allow you to rename media files based on their metadata... each works in different ways, so you'll have to look yourself for one that fits you (personally, I like the ones who open a text editor with the file names and you just edit them).

If you use KDE (DK about other environments) and only need a progressive counter, the simplest way is just select the files in dolphin, hit F2 and enter a pattern like "Tv Show Episode S01E##.mp4".

(of course you can also write a script to rename the files, but I guess you wouldn't have asked if you were prepared to do so)

[–] gaf@lemmy.one 1 points 1 year ago

This can be done natively in Thunar if you happen to use XFCE.

krenamer can do this. It just is a regex front end. You could do it with a shell script too.