Hello, I ripped some CDs from my collection to MP3s and I have this problem: the ripper created the file names using the name of the author, the name of the album and the name of the track, like that: some_author_-_some_album_-_XX_-_some_track.mp3. I can't burn theses files on a CD without renaming them, and this is a pain. How do I shorten theses names to just XX_-_some_track.mp3, using a script? Best regards, David Garnier
Hi, On Monday, February 18, 2002 at 19:04:56, David Garnier wrote:
I ripped some CDs from my collection to MP3s and I have this problem: the ripper created the file names using the name of the author, the name of the album and the name of the track, like that: some_author_-_some_album_-_XX_-_some_track.mp3.
I can't burn theses files on a CD without renaming them, and this is a pain.
Why? mkisofs -JR -o /tmp/iso /path/to/mp3z -J Generate Joliet directory records in addition to regular iso9660 file names. This is primarily use ful when the discs are to be used on Windows-NT or Windows-95 machines. -R Generate SUSP and RR records using the Rock Ridge protocol to further describe the files on the iso9660 filesystem.
How do I shorten theses names to just XX_-_some_track.mp3, using a script?
for i in *.mp3; do mv $i `echo $i | cut -d "-" -f 3,4 | sed s/_//`; done Henne -- Hendrik Vogelsang aka Henne mailto: hvogel@suse.de If you could be either God's worst enemy or nothing, which would you choose? # fightclub sigs made with fortune
On Mon, 18 Feb 2002, David Garnier wrote:
I ripped some CDs from my collection to MP3s and I have this problem: the ripper created the file names using the name of the author, the name of the album and the name of the track, like that: some_author_-_some_album_-_XX_-_some_track.mp3.
I can't burn theses files on a CD without renaming them, and this is a pain.
How do I shorten theses names to just XX_-_some_track.mp3, using a script?
No need for a script, use "mmv": mmv "some_author_-_*" "#1" will rename all files by removing "some_author_-_" from the beginning. Quite neat, huh? Bye, LenZ -- ------------------------------------------------------------------ Lenz Grimmer SuSE GmbH mailto:grimmer@suse.de Deutschherrnstr. 15-19 http://www.suse.de/~grimmer/ 90429 Nuernberg, Germany Repent and return those library books.
Le Lundi 18 Février 2002 20:07, vous avez écrit :
On Mon, 18 Feb 2002, David Garnier wrote:
I ripped some CDs from my collection to MP3s and I have this problem: the ripper created the file names using the name of the author, the name of the album and the name of the track, like that: some_author_-_some_album_-_XX_-_some_track.mp3.
I can't burn theses files on a CD without renaming them, and this is a pain.
How do I shorten theses names to just XX_-_some_track.mp3, using a script?
No need for a script, use "mmv":
mmv "some_author_-_*" "#1" will rename all files by removing "some_author_-_" from the beginning.
Quite neat, huh?
Bye, LenZ
Bloody hell this works (almost) great! The only problem is that #1 should be =1. So the final command is : mmv "some_author_-_*" "=1" The syntax is a bit special but the tool is powerful. When I think of the time I spent doing this in my Windows days... After posting this, I realize that this was actually a FreeBSD question since my file server is a FreeBSD box. But the good people at FreeBSD did provide a port for mmv, so all is good. Thanks for all the submissions. Best regards, David Garnier
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On February 18, 2002 02:04 pm, David Garnier wrote:
I ripped some CDs from my collection to MP3s and I have this problem: the ripper created the file names using the name of the author, the name of the album and the name of the track, like that: some_author_-_some_album_-_XX_-_some_track.mp3.
I can't burn theses files on a CD without renaming them, and this is a pain.
How do I shorten theses names to just XX_-_some_track.mp3, using a script?
I've been using yamt from the SuSE discs and it's wonderful. I've been placing the track numbers in the comment field. Hope that helps, - -- James Oakley Engineering - SolutionInc Ltd. joakley@solutioninc.com http://www.solutioninc.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8cXIv+FOexA3koIgRAovIAJ9q8qIQ6SlahVmuFivQex+5gNavbgCeP6i3 7k3YvibSKuy8X1NM/QfWmCU= =dN0i -----END PGP SIGNATURE-----
--- David Garnier
Hello,
I ripped some CDs from my collection to MP3s and I have this problem: the ripper created the file names using the name of the author, the name of the album and the name of the track, like that: some_author_-_some_album_-_XX_-_some_track.mp3.
I can't burn theses files on a CD without renaming them, and this is a pain.
How do I shorten theses names to just XX_-_some_track.mp3, using a script?
Check Yast2 for a file named 'mmv' (i.e., multiple move). It's absolutely brilliant! In your case, you could type the following: mmv "*XX_-_some_track.mp3" \ "XX_-_some_track.mp3" Let us know how it goes, Eric __________________________________________________ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com
participants (6)
-
David Garnier
-
Eric Pierce
-
Henne Vogelsang
-
James Oakley
-
Lenz Grimmer
-
tabanna