Gentoo Archives: gentoo-user

From: Paul Hartman <paul.hartman+gentoo@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Changing names of LOTS of files, adding to them actually.
Date: Thu, 01 Dec 2011 13:53:05
Message-Id: CAEH5T2ND9kwQ3Sar=5ovyfQ_Wheg_DRUFRqRz5zPkHOmjc8cgg@mail.gmail.com
In Reply to: Re: [gentoo-user] Changing names of LOTS of files, adding to them actually. by James Broadhead
1 On Thu, Dec 1, 2011 at 7:22 AM, James Broadhead
2 <jamesbroadhead@×××××.com> wrote:
3 > On 1 December 2011 10:55, Helmut Jarausch <jarausch@××××××××××××××××.de> wrote:
4 >> On 12/01/2011 10:34:33 AM, Stroller wrote:
5 >>>
6 >>> On 1 December 2011, at 01:49, Dale wrote:
7 >>> > ...
8 >>> > I ran into a problem.  I been downloading a lot of TV shows.  I
9 >>> forgot to put a sort of important part in the names.  This is what I
10 >>> have with the full path:
11 >>> >
12 >>> > /data/Movies/TV_Series/Person of Interest/Season 1, Episode 1 -
13 >>> Pilot.mp4
14 >>> >
15 >>> > This is what I need it to be:
16 >>> >
17 >>> > /data/Movies/TV_Series/Person of Interest/Person of Interest -
18 >>> Season 1, Episode 1 - Pilot.mp4
19 >>> >
20 >
21 > I'm surprised that no one mentioned 'mmv', which I switched to from rename.
22 > It has nice simple syntax, which is good for the _one thing that it
23 > does_, which makes it nice and unixy.
24 > All I've ever needed (I use python for anything more complex)
25 > ? Single character match
26 > * String match until next token
27 > #1, #2 , #3 for first match, second match etc.
28 >
29 > cd /data/Movies/TV_Series/
30 > # for all series
31 > mmv "*/*" "#1/#1-#2"
32 >
33
34 Seconded. I use mmv all the time! And I used to use "ren", its predecessor. :)