Forum rules
Under no circumstances is spamming or advertising of any kind allowed. Do not post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate others security. Profanity or any kind of insolent behavior to other members (regardless of rank) will not be tolerated. Remember, what you don’t find offensive can be offensive to other members. Please treat each other with the kind of reverence you’d expect from other members.
Failure to comply with any of the above will result in users being banned without notice. If any further details are needed, contact: “The team” using the link at the bottom of the forum page. Thank you.
suadnovic
Posts: 281
Joined: Tue Aug 19, 2014 7:41 pm

Renaming subtitle problem

Thu Feb 11, 2016 4:57 pm

I have a lot of subtitles for
Aqua Teen Hunger Force
http://www.imdb.com/title/tt0297494/

which I wish to upload and next problem:
subtitles have names like
Aqua Teen Hunger Force - 01x01 - Rabbot.DVD-Rip .English.updated.Addic7ed.com.srt
Aqua Teen Hunger Force - 01x02 - Escape From Leprauchpolis.ABN.Spanish.C.updated.Addic7ed.com.srt
and as I noted, opensubtitles.org doesn't allow advertisements, so I wish to rename files to
Aqua Teen Hunger Force - 01x01 - Rabbot.DVD-Rip .English.srt and
Aqua Teen Hunger Force - 01x02 - Escape From Leprauchpolis.ABN.Spanish.srt
but this is lot of boring job. How to this at once for all subtiles? Some bat file maybe? Or some application like Bulk Rename Utility which I have, but not able to do this job.

User avatar
hector
Posts: 370
Joined: Wed Jan 01, 2014 12:27 pm
Location: Spain

Re: Renaming subtitle problem

Thu Feb 11, 2016 9:04 pm

If you have a bash-like shell you can use this script. Do it under your own responsibility.
You can try it in a temporary directory first. I'm not an expert in BASH but I think it works.
Bad luck if you use windoze. You can try http://www.mingw.org

It will delete all characters after the word "updated".

Code: Select all

IFS="" for file in *srt; do newname=$(echo $file|sed 's/\.updated.*/.srt/') mv "$file" $newname done

User avatar
hector
Posts: 370
Joined: Wed Jan 01, 2014 12:27 pm
Location: Spain

Re: Renaming subtitle problem

Thu Feb 11, 2016 9:32 pm

But I think rename could do it as well:

Code: Select all

rename 's/\.update.*/.srt/' *.srt

suadnovic
Posts: 281
Joined: Tue Aug 19, 2014 7:41 pm

Re: Renaming subtitle problem

Fri Feb 12, 2016 9:50 am

Thanks people, in meantime I findet solution with Bulk Rename Utility (great thing).
https://www.youtube.com/watch?v=8diBIWR318c
Here is
Image

User avatar
hector
Posts: 370
Joined: Wed Jan 01, 2014 12:27 pm
Location: Spain

Re: Renaming subtitle problem

Sat Feb 13, 2016 12:48 am

Yeah, we live in different worlds :-)

Return to “General talk”

Who is online

Users browsing this forum: Google [Bot] and 126 guests