On 15/01/2026 06:53, Terry Coles wrote:
On 14/01/2026 21:38, Peter Merchant wrote:
Hi, I have just copied a number of discs of music files to one folder and the individual files start with 01 - Artistname. How do I do a bulk rename to remove the 01-, 02-, etc?
Hi, Peter,
I haven't had to do this for some time, but I had a similar task some years ago when
I had to remove the ' and " chars in filenames because the dumb MP3 Player in
my car barfed at themĀ I used krename, which makes the above exercise really easy.
Your requirement is a little more complicated because you have a moving target
(eg the ascending numbers), but I'm sure that it is not difficult if a grep
expression is included in the target string.
As I'm sure someone else will point out, the whole thing can be done in the
shell, but I've never been that comfortable with grep, so I'll leave that to
someone else.
I think I have got it the hard way. Now to repeat 12 times.
peterm@peterm-kubuntu:~/Music/Jazz Essentials$ rename -v 's/01 - //' *.ogg
01 - Charlie Parker - All the Things You Are.ogg renamed as Charlie Parker -
All the Things You Are.ogg
01 - John Coltrane - Blue Train (live).ogg renamed as John Coltrane - Blue
Train (live).ogg
01 - Miles Davis - Half Nelson.ogg renamed as Miles Davis - Half Nelson.ogg
01 - Thelonious Monk - Blue Monk (live).ogg renamed as Thelonious Monk - Blue
Monk (live).ogg
Peter
--
Next meeting: Online, Jitsi, Tuesday, 2026-02-03 20:00
Check to whom you are replying
Meetings, mailing list, IRC, ... https://dorset.lug.org.uk
New thread, don't hijack: mailto:[email protected]