[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: changing extensions, a little OT perhaps.



On Fri, 2002-04-26 at 20:32, Bob Torres wrote:
    Hi All,
    
    I recently transferred some MP3s from my MacOS desktop to my Debianppc
    laptop.  There are no file extensions for these mp3 files, so they're
    kind worthless for xmms in Linux. 
    
    On the Linux side, how would I go about adding extensions to these files
    without doing it manually?  In other words, is there something I could
    pass at the command line to accomplish this for a whole directory of
    files?  I've been using Linux for three years or so now, and I've always
    wanted to know how to do this...anyone care to educate me?  I'm hoping
    for something a little more substantive than "go learn sed (or whatever
    program)," though learning by example usually works the best for me. ; )
    
In terminal:
------------

for i in *; do
   mv $i $i.mp3;
done

-------------

I hope the above works (I need to sleep soon, no guarantees :) 

This assumes all the files are MP3 on the directory you run it in. So
beware, it adds a .mp3 extension to *all files* on current directory.

Tuomas

-- 
:: :: Tuomas Kuosmanen  :: Art Director, Ximian :: ::
:: :: tigert@ximian.com :: www.ximian.com       :: ::


-- 
To UNSUBSCRIBE, email to debian-powerpc-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: